Directory Permissions

SATOH Fumiyasu fumiya at cij.co.jp
Fri Jun 18 02:38:44 GMT 1999


>From: "Mikkel L. Ellertson" <mikkel at execpc.com>
>You could set the "sticky bit" for the directory.  Then users can only
>delete files they create.
>
>[drivers]
>       comment                 = General Hardware Drivers
>        path                    = /data/samba/shares/drivers
>        browsable               = yes 
>        writable                = yes
>        valid users             = @staff
>        force create mode       = 1750

The sticky bit is not required for file mode.

         force create mode       = 0750

>        force directory mode    = 1770

At Solaris 2.x, the mkdir system call can't set the sticky bit.
Is this feature of SVR4? (or others?)
Does anyone know how to set the sticky bit to the directory in
this situation?


% uname -a
SunOS kauai 5.6 Generic_105181-12 sun4u sparc SUNW,Ultra-2
% ls -ld hoge
hoge: No such file or directory
% cat mkdir.c
main()
{
    mkdir("hoge",01750);
}
% gcc mkdir.c
% ./a.out
% ls -ld hoge
drwxr-x---   2 fumiya   user          69 Jun 18 11:26 hoge

-- >8 -- signature -- >8 --
FROM    : SATOH Fumiyasu <fumiya at cij.co.jp>
WEB     : http://www.bento.ad.jp/~fumiya/
WEB(LAN): http://kumasun.si.ykhm.cij.co.jp/
SAMBA   : http://samba.bento.ad.jp/


More information about the samba mailing list