Hello, I have a problem with Samba's 'dos filemode'. ----------------------->8------------------------ First, my smb.conf is: # Samba config file created using SWAT # from localhost (127.0.0.1) # Date: 2001/09/07 16:05:48 # Global parameters [global] workgroup = SYENSNET netbios aliases = printserver server string = Syens samba server encrypt passwords = Yes map to guest = Bad User domain logons = Yes os level = 65 domain master = True dns proxy = No wins support = Yes printing = cups [test] comment = Hans' test directory path = /home/tst admin users = admin read only = No directory mask = 0775 inherit permissions = Yes dos filemode = Yes -----------------------8<------------------------ In /home/tst/ is the following directory: ----------------------->8------------------------ drwxrwxr-t 7 syens syens 527 Sep 19 15:47 . drwxrwxr-x 3 syens syens 59 Aug 8 14:30 .. -rwxrw-r-- 1 jurgen syens 33280 Sep 19 15:47 3EBA9100 -rwxrw-r-- 1 jurgen syens 35840 Sep 7 15:36 katja.doc drwxrwxr-x 3 jurgen syens 176 Sep 6 17:23 map_jurgen_00 -rwxrw-r-- 1 katja syens 183808 Sep 19 15:46 tst_jurgen_00.doc -rwxrw-r-- 1 katja syens 33280 Sep 19 15:46 tst_jurgen_00.xls -rwxrw-r-- 1 katja syens 70144 Sep 7 14:23 tst_katja.doc -----------------------8<------------------------ With the option 'dos filemode = Yes' I expect user jurgen to be able to delete the file tst_jurgen_00.xls. This is not the case. Editing the file in Excel (Excel 2002) fails too: on saving Excel first creates a temporary file (3EBA9100 in this case) which is renamed to the destination file. This rename fails because user jurgen doesn't have delete rights on a file of user katja. Has someone a clue what is going wrong? System info: syens1:/home/tst/Algemeen # uname -a Linux syens1 2.4.4-64GB-SMP #1 SMP Fri May 18 14:54:08 GMT 2001 i686 unknown syens1:/home/tst/Algemeen # smbd -V Version 2.2.0a The whole system is running on a reiserfs file system. Cheers, Hans
I notice that the sticky bit is set on your directory. My copy of "Advanced Programming in the UNIX Environment" by W. Richard Stevens says the following about the sticky bit: Both SVR4 and 4.3+BSD allow the sticky bit to be set for a directory. If the bit is set for a directory a file in the directory can be removed or renamed only if the user has write permission for the directory and either: * owns the file, * owns the directory, or * is the superuser. None of these would seem to apply. However for the case in question jurgen seems to be in the proper group and if the sticky bit were not set would be able to manipulate the file. Perhaps you should try chmod 0775 on the directory in question. On Wed, 2001-09-19 at 07:14, D. van Leeuwen wrote:> Hello, > > I have a problem with Samba's 'dos filemode'. > > ----------------------->8------------------------ > First, my smb.conf is: > # Samba config file created using SWAT > # from localhost (127.0.0.1) > # Date: 2001/09/07 16:05:48 > > # Global parameters > [global] > workgroup = SYENSNET > netbios aliases = printserver > server string = Syens samba server > encrypt passwords = Yes > map to guest = Bad User > domain logons = Yes > os level = 65 > domain master = True > dns proxy = No > wins support = Yes > printing = cups > > [test] > comment = Hans' test directory > path = /home/tst > admin users = admin > read only = No > directory mask = 0775 > inherit permissions = Yes > dos filemode = Yes > -----------------------8<------------------------ > > In /home/tst/ is the following directory: > ----------------------->8------------------------ > drwxrwxr-t 7 syens syens 527 Sep 19 15:47 . > drwxrwxr-x 3 syens syens 59 Aug 8 14:30 .. > -rwxrw-r-- 1 jurgen syens 33280 Sep 19 15:47 3EBA9100 > -rwxrw-r-- 1 jurgen syens 35840 Sep 7 15:36 katja.doc > drwxrwxr-x 3 jurgen syens 176 Sep 6 17:23 map_jurgen_00 > -rwxrw-r-- 1 katja syens 183808 Sep 19 15:46 tst_jurgen_00.doc > -rwxrw-r-- 1 katja syens 33280 Sep 19 15:46 tst_jurgen_00.xls > -rwxrw-r-- 1 katja syens 70144 Sep 7 14:23 tst_katja.doc > -----------------------8<------------------------ > With the option 'dos filemode = Yes' I expect user jurgen to be able to > delete the file tst_jurgen_00.xls. > This is not the case. > > Editing the file in Excel (Excel 2002) fails too: on saving Excel first > creates a > temporary file (3EBA9100 in this case) which is renamed to the destination > file. This rename fails because > user jurgen doesn't have delete rights on a file of user katja. > > Has someone a clue what is going wrong? > System info: > syens1:/home/tst/Algemeen # uname -a > Linux syens1 2.4.4-64GB-SMP #1 SMP Fri May 18 14:54:08 GMT 2001 i686 unknown > syens1:/home/tst/Algemeen # smbd -V > Version 2.2.0a > The whole system is running on a reiserfs file system. > > Cheers, > > Hans > > >
> From: Mark Dailey <mdailey@accero.net> > Date: 19 Sep 2001 07:54:34 -0700 > > I notice that the sticky bit is set on your directory. > > Perhaps you should try chmod 0775 on the directory in question.Yes! That works very well. I feel realy stupid, never had any trouble with sticky bit and I didn't understand the concept. I must have been to rigorous with chmod when things didn't work in the beginning. Thanks a lot Mark. Hans
On Wed, 19 Sep 2001, D. van Leeuwen wrote:> drwxrwxr-t 7 syens syens 527 Sep 19 15:47 . > drwxrwxr-x 3 syens syens 59 Aug 8 14:30 .. > -rwxrw-r-- 1 jurgen syens 33280 Sep 19 15:47 3EBA9100 > -rwxrw-r-- 1 jurgen syens 35840 Sep 7 15:36 katja.doc > drwxrwxr-x 3 jurgen syens 176 Sep 6 17:23 map_jurgen_00 > -rwxrw-r-- 1 katja syens 183808 Sep 19 15:46 tst_jurgen_00.doc > -rwxrw-r-- 1 katja syens 33280 Sep 19 15:46 tst_jurgen_00.xls > -rwxrw-r-- 1 katja syens 70144 Sep 7 14:23 tst_katja.doc > -----------------------8<------------------------ > With the option 'dos filemode = Yes' I expect user jurgen to be able to > delete the file tst_jurgen_00.xls. > This is not the case.I assume /etc/group looks like syens:*:100:jurgen,katja ? cheers, jerry --------------------------------------------------------------------- www.samba.org SAMBA Team jerry_at_samba.org www.plainjoe.org jerry_at_plainjoe.org --"I never saved anything for the swim back." Ethan Hawk in Gattaca--