I'm using samba 3.0.10 on FC3 with LDAP pwd-backend and acls. The "dos filemode" parameter isn't working as it should. Normally the user that has write access to a file, should be able to change permissions of that file. But instead of beeing able to change the permissions the user can become the owner of that file. Alex
I searched the logs an found follwing entry: [2005/01/13 09:25:20, 3] smbd/dosmode.c:unix_mode(111) unix_mode(test2/testfile) returning 0744 [2005/01/13 09:20:55, 2] smbd/open.c:open_file(245) testuser1 opened file test2/testfile read=Yes write=No (numopen=1) As it seems dosmode.c is reading the wrong permissions of the file as the user (testuser1) is is in the group assigned to the file ("Domain Users:x:513:testuser1" - /etc/groups) and 770 mode set on the file ("-rwxrwx--- 1 root Domain Users 0 13. Jan 07:02 testfile"). Hope that helps finding the bug. Thanks in advance, Alex. (In reply to comment #0) > I'm using samba 3.0.10 on FC3 with LDAP pwd-backend and acls. > The "dos filemode" parameter isn't working as it should. > Normally the user that has write access to a file, should > be able to change permissions of that file. But instead > of beeing able to change the permissions the user can > become the owner of that file. > > Alex
Do you have EA support on that filesystem ? Can you go a getfattr call on the file in question and see if it's storing the DOS mode in EA's, not unix mode bits ? Thanks, Jeremy.
(In reply to comment #2) > Do you have EA support on that filesystem ? Can you go a getfattr call on the > file in question and see if it's storing the DOS mode in EA's, not unix mode bits ? > > Thanks, > > Jeremy. I have EA support enabled (both smb.conf and fs) but with or without EA enabled the behavior is the same. A getfattr on the file returns nothing. By the way, if I set the read only bit in the windows dialog then the permissions are changed from 770 to 550 and it is not possible for the windows-user to change it back. Another bug or the same ? Thanks, Alex.
*** Bug 1159 has been marked as a duplicate of this bug. ***
Created attachment 1120 [details] patch to fix problem that "dos filemode" doesn't function correctly
Ok maybe I'm being really dumb here but I need you to explain what the proposed patch is doing. It seems to be setting the file user owner to be the mapping of the given owner SID in the DACL. If this uid isn't the owner won't that fail on set ? I need to code up a test for this to make sure, but I'm guessing the setfacl would fail in this case. Can you explain it to me please ? Jeremy.
This should be fixed now in 3.0.23 (didn't use the patch though).