git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git changes permissions on directories when deleting files.
@ 2011-03-01  1:42 Chad Joan
  2011-03-01  1:45 ` Chad Joan
  2011-03-01  2:19 ` Computer Druid
  0 siblings, 2 replies; 19+ messages in thread
From: Chad Joan @ 2011-03-01  1:42 UTC (permalink / raw)
  To: git

Hello,

What I'm experiencing is this:

$ cd ~/project
$ ls -dl somedir
drwxrwx--- 1 cjoan cjoan 0 Feb 28 19:57 somedir
$ echo "some text" > somedir/somefile.txt
$ git add somedir/somefile.txt
$ git rm -f somedir/somefile.txt
rm 'somedir/somefile.txt'
$ ls -dl somedir
drw------- 1 cjoan cjoan 0 Feb 28 19:57 somedir
$ echo "some text" > somedir/somefile.txt
bash: somedir/somefile.txt: Permission denied

~/project is actually a CIFS mount, with the host being an OpenVMS machine.

If I use the normal rm command without using git then the permissions
will remain the same on 'somedir'.  This is why I suspect (and hope)
this isn't OpenVMS related.

It seems that execute bit is important for CIFS mounted files, because
after this happens I am no longer able to do /anything/ within the
'somedir' directory.  This also affects branches via "git checkout
branchname": if the checkout happens to delete files then this will
happen, and it will salt the wound by failing to sync a bunch of files
in 'somedir' (because I can't access them anymore) while still moving
HEAD to the new branch.

The share on the CIFS host looks like this:

[homes]
        comment = Home Directories
        read only = No
        create mask = 0770
        browseable = No
        vfs objects = varvfc
        vms path names = No
        case sensitive = Yes

The fstab entry for the mount looks like this:

//vms/homes  /home/cjoan/project  cifs
credentials=/home/cjoan/.cifs_credentials,_netdev,uid=cjoan,gid=cjoan
0 0

I'd really like my directories to keep their permissions.
Any idea what might cause this?

- Chad

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-03-11  6:10 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-01  1:42 Git changes permissions on directories when deleting files Chad Joan
2011-03-01  1:45 ` Chad Joan
2011-03-01  2:19 ` Computer Druid
2011-03-01  4:00   ` Chad Joan
2011-03-01 15:51     ` Chad Joan
2011-03-01 17:11       ` Computer Druid
2011-03-01 19:35         ` Chad Joan
2011-03-01 19:44           ` Jeff King
2011-03-01 19:57             ` Chad Joan
2011-03-01 20:08               ` Jeff King
2011-03-01 20:30                 ` Chad Joan
2011-03-01 20:39                   ` Computer Druid
2011-03-01 20:57                     ` Jeff King
2011-03-01 20:43                   ` Matthieu Moy
2011-03-01 20:46                     ` Chad Joan
2011-03-01 21:08                       ` Jeff King
2011-03-03  3:48                         ` Chad Joan
2011-03-03 15:16                           ` Jeff King
2011-03-11  6:09                             ` Chad Joan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).