[Samba] Allow write but not overwrite?

John H Terpstra jht at Samba.Org
Tue May 17 18:08:04 GMT 2005

On Tuesday 17 May 2005 09:31, Jonathan Kelly wrote:
> Hello,
> I want to configure a Samba server to serve as an "archive" where users
> would be allowed to read, write new files, but not overwrite or delete them
> once they're there.
> I guess a script that changes the file permissions (ran, say, every 10
> minutes) would do the trick but I was wondering if a cleaner way exists.

Jeremy Allison implemented support for this, now called "Drop-Box" support, 
very recently. I have yet to document it. I hope to do that soon. Here is the 
core of what you need to do:

1. Create a directory share point
2. Set the owner to someone who is NOT a member of the group that owns
	the directory
3. Set permissions to: rwxrws---
4. In smb.conf:
	a) Create a share stanza
	b) Add: 
		inherit permissions = Yes
		inherit owner = Yes
5. Users must be members of the group that owns the directory and the files
	within it.

That is the rough notes I took at the time. I have not tested this - so be 
warned that I suffer bit-rot and may have left something out.

- John T.
John H Terpstra
Samba-Team Member
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 mailing list