I have a user ‘git’ that owns a git repository. I’m trying to setup a post-update hook that copies the files in the repository to /var/www/site/. I’m still getting a hang of users and permissions in linux, what is the best scheme for this situation?
Share
You could either have git own
/var/www/site/, and give it 660 permissions on it (read and write, no execute), or make/var/www/site/world writeable (which is not entirely a good idea, as then any user can copy, edit, etc. files in/var/www/site/).chowncould help you change the owner, andchmodcan help you change file permissions.You can also add git to the group who owns
/var/www/site/, and make sure that the group has read/write permissions on/var/www/site/as well.And if you ever need help with chown, chmod, or any other linux command,
mancan help you out.