[Samba] Set "setuid" bit on a Solaris server from a Windows client

Bolz, Karsten karsten.bolz at sun.com
Mon Apr 10 19:29:14 GMT 2006

Dear all,

I'm running Samba version 3.0.4 (this is what comes with Solaris 10) on a Solaris machine. For WORM file system support, a new "Snaplock"-mechanism has been implemented into SAM-FS. This mechanism uses the setting of the "setuid" bit (e. g.: "chmod 4000 <filename>") to trigger a file to become a WORM file (i. e. it cannot be modified / deleted before a "retention period" is over).
Is there a way to trigger this bit from a Windows client? (As to my knowledge Windows is not aware of the existence of this "setuid" bit, thus it can't trigger it. Right?)

Other implementations of a CIFS protocol stack work as follows: In order to trigger the "setuid" bit, the Windows client sends an "attrib +s-r <filename>" (set system attribute and set file to read only). The server intercepts this command and flips the S-bit (-rw-r--r-- becomes -r-Sr--r--).
As to my understanding, for Samba this would require a slight modification in smbd/dismode.c (at least this is what I read from the debug log).

Anybody else ever came across this problem? Any solution, comments, thoughts...

Kind regards


Karsten Bolz
Storage Architect
Sun Microsystems GmbH
Data Management Group
Phone: +49 6196 9568-264
Fax: +49 6196 9568-293

More information about the samba mailing list