Looking for a way to prevent a user from deleting files when put in the trash. Is there a script (or

iqbal_jamf
New Contributor II

Looking for a way to prevent a user from deleting files when put in the trash. Is there a script (or such…) to lock the trash so that files could not be placed in or preventing them from selecting Empty Trash?

4 REPLIES 4

Anonymous
Not applicable

as far, as I know, the trash is owned by the user. I guess, the only way, will be, to change the owner of each users trash and set up the preferences, that the user cannot put anything in the trash. BUT: It the user does that not with the GUI, he will still be able to delete files via the terminal. In my opinion, such a restriction does not make any sense

sdagley
Esteemed Contributor II

I'd 2nd what @Anonymous said. Plus users always have the option of doing an Option-Command-Delete to immediately delete the current selection in the Finder (if it's files/folders they own) and locking the user's Trash folder won't stop that.

scottb
Honored Contributor

Also, if the users are admins, they can delete anything in the terminal, etc...

jpeters21
Contributor II

not helpful I know.. but I am just imagining what is going on with this user that your are trying to engineer such a solution. If they are a local admin, you have already given them the rights to do so, you could make a work flow to make an app/config/pref "self healing"  with smart groups. if they aren't and you are trying to protect stuff in the in the users space it sounds like a whole other problem.