I'm currently building a ubuntu (10.0.4 LTS) server on a VPS to host a WordPress based website.
I've got gitosis installed to host the remote repository and what I would like to do is plugin to the post receive
hook to update the WordPress theme when I git push
.
I'm getting a bit confused with users and permissions. As when we I run git pull
the files in /var/www
will be owned by the git user. Ideally I would like all files in the /var/www
to be owned by the same user as I think this would be safer?
I've currently got the /var/www
folder owned my the www-data user, after some reading I've realised this is not the best thing to do. I need a bit of help working out the best plan of action for this?