1

I have a sample directory shared out with Samba which all users should have read/write access to. I would like to prevent some of these users from deleting any files (even the ones they create). This is mostly to prevent accidental deletions.

How can I ensure that some users have the ability to delete files while others do not?

Things I've Tried:

Sticky bit +t --- This still allows users to delete their own files. Not desired.

(Samba) create mode=555 --- This prevents all deletions. I want some users to still be able to delete files.

1

One way I could see this being accomplished is to associate the files with a specific group, ie. smbdeleters. Then add the users you would like to be able to delete to that group. You could set the permissions to 575 and that should allow those users to delete files. If you need a more fine-grained approach, ACL's might be what you are looking for, you would need to look at the man page and see what suits your needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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