[Samba] Preventing deletion of folders under a SAMBA share: SOLVED

Stuart Callender stuart.callender at calstera.com
Sat Feb 5 09:18:42 GMT 2005


Thanks for this.  Yes this does work nicely, however the main reason
things weren't going to plan was quite simple.  I had set force user =
root, in an attempt to ensure that all new folders were owned by root -
silly I know, but somehow overlooked, and was forcing each user to be
connected as root - doh!

All I need to accomplish now, is to prevent deletion of any folder
created by a user - ie. once created, cannot be deleted.  If I can find
a way round this through SAMBA, then I shall need to set up a script to
change ownership of the folder structure in an overnight batch job.

Using chattr is also a really good way to avoid accidental deletion of
top-level folders.  I had a play with this last night and it works
really well.

Thanks to you all that assisted - it was really appreciated.

Stuart

> Stuart Callender:
> 
> 
>>Thanks for the reply.  I thought this too, but no matter what
>>permissions I give for existing folders via Unix permissions (even
tried
>>sticky bits), or via the directory mask and force directory mode, the
>>folders can still be deleted.

the folder can be deleted if *the parent* folder has deletion rights.
e.g.
"parent": 0555
"parent/child": 0777
"child" cannot be deleted, all folders in child you can delete

if you have *no* linux fs (ext2/ext3/a.s.o.) e.g. FAT, this will take no

effect... :-(

i hop it helped.

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba





More information about the samba mailing list