We've implemented a share for file exchange : [TEMP] path = /tmp read only = no create mask = 0666 directory mask = 1777 A number of sub-directories are created under /tmp, all of them have the sticky-bit set, i.e. mode 1777 (chmod a+rwxt). Users can put files in directories which belong to someone else, but the owner of these directories cannot delete the files created by others. For example, we a directory "/tmp/test_dir" which belongs to "user1" : drwxrwxrwt 2 user1 users 4096 Apr 29 09:39 test_dir Then "user2" can put files in it : ~> smbclient -U user2 //xxx.xxx.xxx.xxx/TEMP Enter user2's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.3.3] smb: \> cd test_dir smb: \test_dir\> put test_file.txt putting file test_file.txt as \test_dir\test_file.txt (0.0 kb/s) (average nan kb/s) smb: \test_dir\> quit But "user1" cannot remove the file : ~> smbclient -U user1 //xxx.xxx.xxx.xxx/TEMP Enter user1's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.3.3] smb: \> cd test_dir smb: \test_dir\> del test_file.txt NT_STATUS_ACCESS_DENIED deleting remote file \test_dir\test_file.txt smb: \test_dir\> quit The same bug is found on WinXP & Win9x clients too. However this implementation was working well in previous releases (3.2.x).
Created attachment 4090 [details] level 3 log
The problem still exists after upgrade to samba 3.3.4 today.
Created attachment 4107 [details] log for samba 3.2.6, in which sticky directories work well
Created attachment 4108 [details] log for samba 3.3.4, to replace the previous log for 3.3.3
Ok, I'll take a look at this. Thanks, Jeremy.
I have tried and can't reproduce this here. Can you post a debug level 10 log of the delete failure please ? Thanks, Jeremy.
Created attachment 4124 [details] level 10 log for samba-3.2.6
Created attachment 4125 [details] level 10 log for samba-3.3.4
Created attachment 4172 [details] level 10 log for samba-3.4.0pre1 (also failed)
Created attachment 4265 [details] level 10 log for samba-3.4.0pre2 (can't even login)
This bug is not reproducible here with latest 3.4.x - this case works perfectly. You will need to give me much more info - such as the group lists of the users you are trying to do this with, and your full smb.conf. I don't consider this a blocker bug as I have no other reports of anyone being able to reproduce this and I can't reproduce it myself. Jeremy.
Created attachment 4271 [details] screen capture when running "sh ./configure ...."
Created attachment 4272 [details] smb.conf
Created attachment 4273 [details] /etc/group
Created attachment 4274 [details] /etc/passwd
Created attachment 4275 [details] smbpasswd
The failure is reproduced with a testbed system. hardware : Pentium-4 2.8GHz, ASUS P4C800 mainboard, 1GB RAM, 80GB HD o.s. : bare LFS running kernel-2.6.23.12, with binutils-2.17, gcc-4.21, glibc-2.5.1 1. downloaded ftp://ftp.samba.org/pub/samba/samba-3.3.4.tar.gz 2. tar zxf samba-3.3.4.tar.gz 3. cd samba-3.3.4/source 4. sh ./configure --prefix=/10/samba-3.3.4 --datarootdir=/10/samba-3.3.4 \ --enable-shared --with-quotas --with-sys-quotas --without-ldap --without-ads (see attachment id=4271) 5. make 6. make install 7. ln -s samba-3.3.4 /10/samba 8. added /10/samba/lib to /etc/ld.so.conf and run ldconfig 9. created /10/samba/lib/smb.conf (see attachment id=4272) 10. created users : useradd user1 useradd user2 /10/samba/bin/smbpasswd -a root /10/samba/bin/smbpasswd -a -n nobody /10/samba/bin/smbpasswd -a user1 /10/samba/bin/smbpasswd -a user2 (see attachments id=4273,4274,4275) 11. login as user1 : mkdir /tmp/test_dir chmod a+rwxt /tmp/test_dir 12. /10/samba/sbin/nmbd -D /10/samba/sbin/smbd -D 13. /10/samba/bin/smbclient -U user2 //xxx.xxx.xxx.xxx/TMP Enter user2's password: Domain=[X093] OS=[Unix] Server=[Samba 3.3.4] smb: \> cd test_dir smb: \test_dir\> put test_file.txt putting file test_file.txt as \test_dir\test_file.txt (0.3 kb/s) (average 0.3 kb/s) smb: \test_dir\> quit 14. /10/samba/bin/smbclient -U user1 //xxx.xxx.xxx.xxx/TMP Enter user1's password: Domain=[X093] OS=[Unix] Server=[Samba 3.3.4] smb: \> cd test_dir smb: \test_dir\> del test_file.txt NT_STATUS_ACCESS_DENIED deleting remote file \test_dir\test_file.txt smb: \test_dir\> quit The level 10 log for steps 13 & 14 had been submitted as attachment id=4125. The above steps had been repeated for different versions and the results are : samba-3.2.6 : works well (see attachment id=4124) samba-3.3.4 : fail (see attachment id=4125) samba-3.4.0pre1 : fail (see attachment id=4172) samba-3.4.0pre2 : can't login in steps 13 & 14 (see attachment id=4265) /10/samba/bin/smbclient -U user1 //xxxx.xxx.xxx.xxx/TMP Enter user1's password: Connection to xxx.xxx.xxx.xxx failed (Error NT_STATUS_CONNECTION_REFUSED)
Ok, I've finally reproduced this. Thanks for your perseverence. I have a patch which I'm currently testing. Jeremy.
Created attachment 4278 [details] Patch for v3-4-test and v3-3-test Karolin and Volker, this needs to be in 3.4.0 and 3.3.next. Please review. Thanks ! Jeremy.
Pushed to v3-4-test and v3-3-test. Will be included in 3.3.5 and 3.4.0. Closing out bug report. Thanks for reporting!