Git changes permissions on directories when deleting files.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]