Restricting delete on a share?

Andrew Bartlett abartlet at samba.org
Mon Mar 10 07:37:26 GMT 2003


On Mon, 2003-03-10 at 18:02, Stefan (metze) Metzmacher wrote:
> At 00:04 10.03.2003 -0600, Jeremy M. Dolan wrote:
> >Hi all.
> >
> >Management here wants to restrict users from deleting files via Samba.
> >NTFS is able to restrict just delete permissions, but still allow new
> >files to be created and old ones changed. But I've come to the
> >conclusion this isn't possible with standard UNIX file permissions,
> >and unfortunately Red Hat does not yet support ACLs on any file
> >systems.
> >
> >In Samba's documentation I don't see any indication that a delete=no
> >type option exists for shares, which surprised me. Am I missing
> >something?
> >
> >If not, is there perhaps a compile-time directive to disallow file
> >deletion?
> >
> >Otherwise, could someone perhaps point me to what I'd want to change
> >in the source to accomplish this?
> 
> you can write a vfs module that overloads the unlink function and returns 
> access denied when the unlink function is called.

Just remember that doing this doesn't actually gain you anything - the
users can still write garbage into the file, or make them zero length. 

So the option you are looking for is 'read only = yes' ;-)

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20030310/5e4e11a3/attachment.bin


More information about the samba-technical mailing list