Prevent file deletion on server but allow read/write permissions

So, I have several iMacs that are basically public computers. They will all access a shared server. The machines need to possess all of the user permissions of a "read/write" user with the EXCEPTION of being allowed to delete. As it is now, a random user could delete our entire server in two clicks. So, I need to somehow secure our data while still allowing the "reading" and "editing" of files.


Here's what I need to do:


• Somehow disable the delete file function altogether (while still maintaining read/edit permissions) or

• Find some 3rd party app or workaround that prompts the user with a password dialogue box in order to execute the "delete" function or

• Somehow apply permissions to a specific folder on the server that enables read/edit, but disables file deleting by users


I set the permissions of my trash folder to "read only" however, this only prevents deleting local files and doesn't prohibit deleting files from the shared drive.


Thoughts?

iMac (24-inch Early 2009), Mac OS X (10.6.8)

Posted on Mar 20, 2014 6:57 AM

Reply
3 replies

Mar 20, 2014 7:41 AM in response to mistereid

I'd rethink the requirements.


The literal answer is that yes, you can mark the files as being undeletable.


The access control list setting via the command line chmod command is something akin to the following:


chmod +a "groupname deny delete"


In practice, these same requirements do allow the shared files to be effectively deleted; via overwrite. (This is why the Unix-layer file protections don't bother to differentiate write from delete access.) These requirements also allow partial file corruptions, a situation which tends to be far more pernicious.

Mar 21, 2014 6:25 AM in response to MrHoffman

Further to our fearless leaders (MrHoffman) comment.


Some applications save new versions of a document by creating a temporary file, deleting the old file, and renaming the temporary file to the original files name. This will not work with file delete disabled. I would not be surprised if Microsoft Office was guilty of this.


It has been my experience that trying to mark stuff undeletable is a lost cause if files need to be modified. If they don't need to be modified then just make them read only.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Prevent file deletion on server but allow read/write permissions

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.