I am running a Samba Server (Version 3.5.6). The file sharing is OK until I realize that Samba changes file ownership when another user (not the original owner) edit the file and saves it. This is particularly true, if I have set admin users parameter to administrate the share.
The strange thing is only the file ownership get changed but 'directory ownership' remain unchanged (which is desirable) :)
Options like force user and force group are not going to work here because, sharing directory have a different sub-directories that belong to many users.
Configuration for the share looks like this
[staff]
comment = "Staff members only"
path = /path/to/staff
browseable = yes
valid users = @staff, @managers, @moderators
write list = @staff, @managers
create mask = 0640
directory mask = 0750
admin users = @moderators`
As you can see, members in above-mentioned groups are allowed to read others data but only members of @moderators can do changes to file & directories.
Problem arises when a member of @moderators modifies a file (not a directory) that belong to another user (belong to @staff or @managers), the ownership of that edited file changes to root!!! which is totally undesirable.
I want to preserve the ownership of the file to its original creator even after a member of @moderators modifies it. How Do I Achieve This???
Thank you in advanced.