[linux-cifs-client] Permissions disappearing on CIFS mounted share.

Eisenhut, Daniel (GE Healthcare) Daniel.Eisenhut at med.ge.com
Wed Nov 30 17:44:15 GMT 2005


I'm having a weird problem that hopefully someone here can help with...

On a WinXP laptop, I share a directory and place a large 170MB tarball
(tarball.bz2) in it and a couple of text files (file1 and file2).  Then
on my Linux box I do the following:

# mkdir cifs test
# mount -t cifs -o user=xxxxx,dom=xxxxx,uid=root,gid=root,file_mode=0664
//server.domain/share cifs
# chmod a+x cifs/file1 cifs/file2
# cd test
# tar jxf ../cifs/tarball.bz2

Halfway through the untarring, the "x" permission on the two other files
disappear.  Doing this many times and looking at the statistics (in
/proc/fs/cifs/Stats), it always seems to do it after about 20000 reads.
I've tried compiling the cifs kernel module with "extended attributes"
and "POSIX Extensions", but no change.  Using smbfs and fmask=0644, the
problem doesn't exist since a chmod seems to have no effect so I can't
set the execute permissions.

I need to add execute permissions to a directory with a bunch of bash
scripts.  But I cannot just change the file_mode to 775 because other
things, such as modules-update, will fail if execute is on files where
it shouldn't be.  My problem occurs because the scripts call each other
and suddenly they don't have permission to anymore.

I tried to enable cifsFYI or traceSMB, but there is just too much to dig
through.  Is anyone familiar with this?  Some kind of synronization with
the server that occurs after a certain amount of traffic and resets the
permissions to what they were originally?

My Linux box is running Gentoo (periodically updated with emerge) with
2.6.14-gentoo kernel and 3.0.14a-r2 of Samba installed.  Windows box
info from /proc/fs/cifs/DebugData:

Display Internal CIFS Data Structures for Debugging
---------------------------------------------------
CIFS Version 1.35
Servers:
1) Name: x.x.x.x  Domain: xxxxxx Mounts: 1 ServerOS: Windows 5.1  
	ServerNOS: Windows 2000 LAN Manager	Capabilities: 0xe3fd
	SMB session status: 1	TCP status: 1
	Local Users To Server: 1 SecMode: 0x3 Req Active: 0
MIDs:

Shares:
1) \\xxxxxxx\Test Uses: 1 Type: NTFS Characteristics: 0x20 Attributes:
0x700ff
PathComponentMax: 255 Status: 1 type: DISK

Thanks,
Dan


More information about the linux-cifs-client mailing list