On Tuesday, October 30, 2012 2:22:47 AM UTC+1, Philipp Kraus wrote:
> I'm running a PHP script which pulls & checkouts a Git repo. The script
> clones first the repo and on each next call it should get all new changes
> (git clone and than git pull).
> Sometime I get the message:
> git checkout-index unable to create file (permission denied)
> exspecially on the .gitignore files. The webserver run the script and the
> file / directory owner is the webserver, also of the .gitignore files, so
> the message "permission denied"
> is wrong. I don't understand why the git client create this message and
> this problem. The PHP script checks first if the directory exists, if not,
> it runs git clone, if it
> exists it calls git --git-dir=repodir pull. Can I setup a flag to the git
> client, that it should only overwrite all files, so that the error is not
My gut feeling is that Git is not wrong here. Try the following:
Do a sudo su webserver ("become" the webserver user), and do the exact
commands it (or PHP) is trying to do in the exact same directories.
If you don't get the same error message, you better share your PHP script
so we can scan it for any obvious problems.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To view this discussion on the web visit
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to
For more options, visit this group at