I intend to setup a samba share server that all user can write files to but they can not delete files was put in that folder.

Which configuration is suitable for me!

Thanks in advanced!

link|improve this question

52% accept rate
feedback

1 Answer

As far as I know it isn't done with samba, but with linux. You should assign the sticky flag to the main share directory with chmod. For example, if you're sharing /home/foo you should execute "chmod +t /home/foo/".

Also I suggest to use the linux ACL system or the default creation mask in samba configuration to propagate automatically this behaviour to subdirectories.

link|improve this answer
Nefeli, I fear this isn't right. The effect of setting the sticky bit on a directory is to prevent anyone other than the creator from deleting files in that directory, even though the directory's permissions would otherwise permit it. I fear that is not what the OP wants! – MadHatter Sep 27 '11 at 6:54
MadHatter, I think you can be right depending on the way the access is configured. As I understand they have a directory where a lot of people can read and write and the staff wants the files they put (the staff, not the users) to not be erased. I usually handle multiple user accesses with groups. If this is the way the samba server is configured, sticky bit should work as desired, isn't it? – nefeli Sep 27 '11 at 7:12
I suspect samba can indeed be configured to allow writes but inhibit deletes, but what you wrote is "it isn't done with samba, but with linux. You should assign the sticky flag to the main share directory.", and I fear that that is simply wrong. – MadHatter Sep 27 '11 at 9:48
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.