[Samba] Mishandling read only files in 3.0.20b vs 3.0.21c

andy liebman andyliebman at aol.com
Wed Mar 22 03:28:13 GMT 2006

I noticed a few days ago running Samba 3.0.20b on Linux that if I had a 
  file called "myfile" that was owned by "userA:groupX", writable by 
userA but read only for groupX

0744 userA:groupX   myfile

and that file was in a directory "/directory2/myfile" which was writable 
by the group "groupX"

0775 userA:groupX  directory2

and directory2 was in directory1 which was also writable by groupX 

0755 userA:groupX  directory1

if as "userB, member of groupX" I connected to a Samba share that 
contained the above directory structure, and the smb.conf file gave 
groupX permission to write to the share, as userB I was unable to move 
"myfile" out of directory1 and put it in directory2, or vice versa.

Upon trying to move the file, Windows XP SP2 told me that the file was 
Read Only and asked if I really wanted to move it. Then Windows gave me 
an Access Denied error.

Running Samba 3.0.13 previously on the same Linux box, with exactly the 
same smb.conf file, moving myfile back and forth between directories was 
not an issue. Also, when I upgraded to Samba 3.0.21c, the issue went away.

My question is, are you (Samba folks) experimenting with something 
here?. I have some Windows and Macintosh applications that will warn you 
when you open a read only file on a local disk. That can be useful, so 
that you don't waste time modifying a file that you won't be able to 
save. With Samba 3.0.13, and Samba 3.0.21c, if the file is located in a 
Samba share, you don't get the warning until you try to save the file.

With Samba 3.0.20b it was useful to get the warnings. However, it was 
BAD that Samba 3.0.20b didn't follow Linux rules where the permissions 
of the directory containing the file should determine if the file can be 
moved or deleted or overwritten.

Any comments or insights into where you are heading with this?

Andy Liebman

More information about the samba mailing list