RE: [Samba] Preventing deletion of folders under a SAMBA share: SOLVED
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 -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Preventing deletion of folders under a SAMBA share: SOLVED
Stuart, 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. Thanks. - 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 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 -- John H Terpstra Samba-Team Member Phone: +1 (650) 580-8668 Author: The Official Samba-3 HOWTO Reference Guide, ISBN: 0131453556 Samba-3 by Example, ISBN: 0131472216 Hardening Linux, ISBN: 0072254971 Other books in production. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
RE: [Samba] Preventing deletion of folders under a SAMBA share
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. Windows 2000 sees the folders as read only, but allows you to delete them. According to O'Rielly's Samba book (based on Samba 2), all should work fine, but it doesn't. I was wondering whether this is because of Windows 2000 allowing delete of Read Only files. As such I may have to perhaps set up a Windows 95/98 box just to see. Didn't see what your OS is, but if it's Linux/extfs3 or whatever, 'man lsattr', 'man chattr'. --Tonni -- mail: [EMAIL PROTECTED] http://www.billy.demon.nl -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Preventing deletion of folders under a SAMBA share
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. Windows 2000 sees the folders as read only, but allows you to delete them. According to O'Rielly's Samba book (based on Samba 2), all should work fine, but it doesn't. I was wondering whether this is because of Windows 2000 allowing delete of Read Only files. As such I may have to perhaps set up a Windows 95/98 box just to see. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Preventing deletion of folders under a SAMBA share
I am trying to set up a basic Samba server and configure it so that folders under a share cannot be deleted accidentally by a user. The ideal scenario would be to have the top-level folders under the share non-deleteable, but folders and files are able to be created under it. I cannot find any easy way of doing this directly, but thought that the use of the 'veto' option would work nicely, by just populating each main top-level folder with a pre-named hidden file (ie. .do_not_remove), then setting veto files = /*.remove/. The theory of this would keep the main folder structure intact. However this option seems to be ignored by Samba 3 and Windows 2000. Windows 2000 will quite happily delete read-only files - which seems to be an annoying trait that cannot be overridden. I have been working for weeks on this and have tried almost every conceivable option from directory permissions to share permissions, etc., with no luck. Windows 2000 Server can do this quite easily, but with obvious licencing costs. I would be extremely disappointed if there wasn't an open-source solution to this. Is the something obvious that I'm missing? Samba has been compiled from source with --with-acl-support option. All helpful comments would be much welcomed. Thanks in Advance. Stuart --- Kernel 2.6 (SuSE 9) Samba Version: 3.0.10 Windows Client: Windows 2000 Professional -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
RE: [Samba] Preventing deletion of folders under a SAMBA share
You should be able to do it by manually applying Unix permissions Or use force directory mode = and force directory security mode. Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stuart Callender Sent: Friday, 4 February 2005 9:14 AM To: samba@lists.samba.org Subject: [Samba] Preventing deletion of folders under a SAMBA share I am trying to set up a basic Samba server and configure it so that folders under a share cannot be deleted accidentally by a user. The ideal scenario would be to have the top-level folders under the share non-deleteable, but folders and files are able to be created under it. I cannot find any easy way of doing this directly, but thought that the use of the 'veto' option would work nicely, by just populating each main top-level folder with a pre-named hidden file (ie. .do_not_remove), then setting veto files = /*.remove/. The theory of this would keep the main folder structure intact. However this option seems to be ignored by Samba 3 and Windows 2000. Windows 2000 will quite happily delete read-only files - which seems to be an annoying trait that cannot be overridden. I have been working for weeks on this and have tried almost every conceivable option from directory permissions to share permissions, etc., with no luck. Windows 2000 Server can do this quite easily, but with obvious licencing costs. I would be extremely disappointed if there wasn't an open-source solution to this. Is the something obvious that I'm missing? Samba has been compiled from source with --with-acl-support option. All helpful comments would be much welcomed. Thanks in Advance. Stuart --- Kernel 2.6 (SuSE 9) Samba Version: 3.0.10 Windows Client: Windows 2000 Professional -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
RE: [Samba] Preventing deletion of folders under a SAMBA share
Hi Steve 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. Windows 2000 sees the folders as read only, but allows you to delete them. According to O'Rielly's Samba book (based on Samba 2), all should work fine, but it doesn't. I was wondering whether this is because of Windows 2000 allowing delete of Read Only files. As such I may have to perhaps set up a Windows 95/98 box just to see. Stuart -Original Message- From: Steve Simeonidis [mailto:[EMAIL PROTECTED] Sent: 03 February 2005 22:32 To: Stuart Callender; samba@lists.samba.org Subject: RE: [Samba] Preventing deletion of folders under a SAMBA share You should be able to do it by manually applying Unix permissions Or use force directory mode = and force directory security mode. Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stuart Callender Sent: Friday, 4 February 2005 9:14 AM To: samba@lists.samba.org Subject: [Samba] Preventing deletion of folders under a SAMBA share I am trying to set up a basic Samba server and configure it so that folders under a share cannot be deleted accidentally by a user. The ideal scenario would be to have the top-level folders under the share non-deleteable, but folders and files are able to be created under it. I cannot find any easy way of doing this directly, but thought that the use of the 'veto' option would work nicely, by just populating each main top-level folder with a pre-named hidden file (ie. .do_not_remove), then setting veto files = /*.remove/. The theory of this would keep the main folder structure intact. However this option seems to be ignored by Samba 3 and Windows 2000. Windows 2000 will quite happily delete read-only files - which seems to be an annoying trait that cannot be overridden. I have been working for weeks on this and have tried almost every conceivable option from directory permissions to share permissions, etc., with no luck. Windows 2000 Server can do this quite easily, but with obvious licencing costs. I would be extremely disappointed if there wasn't an open-source solution to this. Is the something obvious that I'm missing? Samba has been compiled from source with --with-acl-support option. All helpful comments would be much welcomed. Thanks in Advance. Stuart --- Kernel 2.6 (SuSE 9) Samba Version: 3.0.10 Windows Client: Windows 2000 Professional -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba