[Samba] How to let users create/delete files but not dirs

Hannes Schmidt mail at schmidt-net.via.t-online.de
Mon Sep 30 20:24:17 GMT 2002


David Morel wrote:
> On Mon, 2002-09-30 at 00:49, Hannes Schmidt wrote:
>> Hi,
>>
>> the subject says it all. I want to allow my Windows users to create
>> and remove files in a particular directory on my Samba share, but
>> they should not be able to create or delete sub-directories of that
>> directory. The reason for this is that I do not want users to mess
>> up the directory structure on that share, which happens just too
>> often right now - thanks to drag and drop.
>>
>> I looked at various ACL implementations and file systems incl.
>> Samba's ACL emulation but they all seem to support the rwx type of
>> permissions only. The problem is that rwx doesn't make a difference
>> between subdirs and files in a directory. Any ideas?
>>
>> --
>> To unsubscribe from this list go to the following URL and read the
>> instructions:  http://lists.samba.org/mailman/listinfo/samba
>
> make directories owned by a user who can't log in, group users, chmod
> 4770 (sticky bit set) and you're done

Excellent. I didn't know the meaning of sticky bit on directories. Two
remarks (in case the kids try this at home). On my system (Linux) setting
the sticky bit is done using "chmod 1770 ..." and setting it (obviously)
doesn't prevent users from creating their own directories but that's
perfectly acceptable to me as long as the don't remove existing ones.

Thank you.




More information about the samba mailing list