[linux-cifs-client] file_mode not honoured by cifs/mount.cifs?

Chris Holland cholland at au1.ibm.com
Thu Apr 15 05:06:55 GMT 2004





I was trying to use the CIFS module to mount a W2K share so that linux
users could write to it, but not read from it (like an uploads directory).
I used:
mount -t cifs -o user=xxxxxx,file_mode=0333,dir_mode=0777 //server/share
/mnt/mountpoint

Doing an "ls -la" on the mounted filesystem shows that files have the
correct permissions: "-wx-wx-wx".
When I try to "cat" one of the files (while not logged on as root), it
allowed me to view the file but should report "permissions denied"!

Doing the same thing with smbfs using fmode=0333, works correctly.  Users
can create files, but cannot read them back.

It seems like the CIFS module may not be correctly honouring the file_mode
option, although I thought that this would have been then kernels
responsibility.

Does this sound like a bug, or am I missing something?

I am using:
- kernel 2.6.4 on top of Red Hat 9.
- CIFS v1.06 downloaded from the CIFS web site.
- mount.cifs (the compiled version available on the CIFS web site - it
reports v1.2)

Thanks.
--
Chris.



More information about the linux-cifs-client mailing list