[Samba] File Locking and Deleting Problem

Michael Stearne mstearne at entermix.com
Sat Apr 15 08:14:56 GMT 2006


I have a new share setup that I would like to do some pretty simple
things with.  I would like to have multiple people connect to it. 
Everyone can read and write to it but the only creator of a given file
can delete that file.  Also, when a given file (say Word, Quark or
Photoshop docs) is open by user1 it should be considered read-only by
the other users. If user1 creates a file user2 (in the same group)
should be able to edit the file as long as no one else is editing it.

This seems very straight forward to me but I can't seem to have the
share follow these rules.  When testing I have either 2 or 3 different
users connected to the share from at least 1 Windows client and 1 OS X
client.  OS X is going to be the main connector to this share but
Windows users will be in there also.

Here's the smb.conf I have:

[global]
	idmap gid = 16777216-33554431
	idmap uid = 16777216-33554431
	path = /var/www/
	unix password sync = yes
	workgroup = cmny
	os level = 20
	auto services = advertising editorial
	null passwords = yes
	encrypt passwords = yes
	winbind use default domain = no
	security = user
	template shell = /bin/false
	lock directory = /var/lock/smb
	share modes = yes
	locking = yes

[advertising]
	writeable = yes
	wide links = no
	path = /var/www/advertising
	strict locking = yes
	force create mode = 755
	valid users = @advertising
        oplocks = False
        level2 oplocks = False

Thanks!
Michael


More information about the samba mailing list