Skip to main content
Question

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

  • September 24, 2022
  • 4 replies
  • 0 views

Forum|alt.badge.img+2

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

  • 0 replies
  • September 26, 2022

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
Forum|alt.badge.img+25
  • Jamf Heroes
  • 3532 replies
  • September 26, 2022
Anonymous wrote:

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


I'd 2nd what  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
Forum|alt.badge.img+18
  • Valued Contributor
  • 1285 replies
  • September 26, 2022

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


Forum|alt.badge.img+8
  • Valued Contributor
  • 108 replies
  • October 2, 2022

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. 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings