Reputation: 5007
Once I clone my repo, the folders don't have write access, and so my PHP code cannot use mkdir()
to make a folder if it needs to.
I get this error:
mkdir(): Permission denied
Why is this? In my repo I have a pages
folder, which has the following permissions after I git clone it to my /var/www/html
folder.
drwxr-xr-x 4 me me 4.0K Jun 9 18:30 pages
Is this set in the repo itself? Or is there some command I can add to git clone
that will allow me to fix this?
Upvotes: 0
Views: 402
Reputation: 38669
The only file permission that is tracked and handled by Git is the executable bit. Everything else is not tracked and not controlled by Git. This is one of the arguments against using Git as a deployment tool which it is not. You can find some hints on how you can utilize Git to make a deployment strategy at http://gitolite.com/deploy.html. The permssions of the files after cloning are simply the default on your linux system. You can change this in your linux environment to be something different.
Upvotes: 1