On Tuesday, October 30, 2012 2:22:47 AM UTC+1, Philipp Kraus wrote:

> Hello,
>
> 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 
> shown?
>

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 
https://groups.google.com/d/msg/git-users/-/OBievF0cSvkJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to