Hi, I want to create a new git repository on my production server, inside the webX directory. When I log in as root user and write "git init" I get a permission denied error. How can I create a new repo in this dir? Thank you.
I have files both in "private" directory and inside "web" directory which are part of the same project. How can I use git to update them all from the repository if I can't create a local git repo inside the main "web7" directory on the server?
http://stackoverflow.com/questions/...u-add-an-external-directory-to-the-repository has at least 3 solutions
Thank you Jesse, But all those solutions are work arounds. The most healthy way is to create the git repo on it's directory. That's the way git usually works, and I'm afraid of having problems in the future due to this change in such a basic thing. I'll be glad to know if there is a way for me to change that specific directory jail and add a new directory that will populate the git repo as it's normally should work? Thank you very much.
You can remove the folder protection of the web root folder (chattr -i) and then add your git repo there.
Thank you Till, Do you mean the general /var/www/ folder? or inside /client0/web7/ folder? How can I reactivate the folder protection ?
chattr -i /var/www/clients/client0/web7 But be aware that a client will be able to delete the whole web folder of his site then, if he does that then apache might not start anymore for all clients and the server will be down.
Ok, it works perfect. Thank you! Can I now re-activate the folder protection manually? Thank you very much.