[Samba] Preventing deletion of folders under a SAMBA share: SOLVED
John H Terpstra
jht at samba.org
Sat Feb 5 14:53:43 GMT 2005
Please would you document what you did to make this work. I'd like to
supplement the additions I made yesterday to the "File, Directory and Share
Access Controls" Chapter of the Samba-HOWTO-Collection.
- John T.
On Saturday 05 February 2005 02:18, Stuart Callender wrote:
> 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 Callender:
> >>Thanks for the reply. I thought this too, but no matter what
> >>permissions I give for existing folders via Unix permissions (even
> >>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.
> "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
John H Terpstra
Phone: +1 (650) 580-8668
The Official Samba-3 HOWTO & Reference Guide, ISBN: 0131453556
Samba-3 by Example, ISBN: 0131472216
Hardening Linux, ISBN: 0072254971
Other books in production.
More information about the samba