On Tue, 13 Sep 2011 07:36:15 -0700 PJ Weisberg <[email protected]> wrote:
[...] > Were you running as root when you checked out? The files are owned > by root, and only root has permission to delete them. Not quite correct. On POSIX, right to delete a file is controlled by the permissions on the containing directory, not on the file itself. To demonstrate: ~$ id uid=1000(kostix) gid=1000(kostix) groups=1000(kostix),... ~$ cd /tmp /tmp$ su Password: /tmp# mkdir foo /tmp# chgrp kostix foo /tmp# chmod 0775 foo /tmp# ls -ld $_ drwxrwxr-x 2 root kostix 4096 Sep 13 18:53 foo /tmp# touch foo/blarb /tmp# vdir foo total 0 -rw-r--r-- 1 root root 0 Sep 13 18:53 blarb /tmp# exit /tmp$ id uid=1000(kostix) gid=1000(kostix) groups=1000(kostix),... /tmp$ rm foo/blarb rm: remove write-protected regular empty file `foo/blarb'? y /tmp$ vdir foo total 0 /tmp$ -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
