0

Creating Permissions on Mac Trash Bin

 2 years ago
source link: https://forums.macrumors.com/threads/creating-permissions-on-mac-trash-bin.2342648/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Creating Permissions on Mac Trash Bin

Got a tip for us? Let us know

liser k.

macrumors newbie

Original poster

Apr 22, 2022

I want to be able to set permissions to my trash bin like you used to do on earlier OS. My goal is - in order to move a file to the trash bin you have to enter the Admin password before completing the move.

liser k.

macrumors newbie

Original poster

Apr 22, 2022

I'd even settle for setting up a password protection for the trash bin itself.

bogdanw

macrumors 68000

Mar 10, 2009

1,612

I want to be able to set permissions to my trash bin like you used to do on earlier OS.
How did you used to do it on an earlier OS and why isn’t it working on this one?

liser k.

macrumors newbie

Original poster

Apr 22, 2022

How did you used to do it on an earlier OS and why isn’t it working on this one?
Before you could choose Get Info on the trash folder and set the permissions at the bottom so it created a password prompt when adding anything to the bin. Im trying to protect work related footage from accidentally being trashed from one of our open viewing stations.

bogdanw

macrumors 68000

Mar 10, 2009

1,612

Something like this?
sudo chown root ~/.Trash

liser k.

macrumors newbie

Original poster

Apr 22, 2022

operation not permitted, which means I need to somehow turn on full disk access with the OS.

bogdanw

macrumors 68000

Mar 10, 2009

1,612

You just need to give Terminal Full Disk Access. You can remove the permission after running the command.

Reactions: liser k.

liser k.

macrumors newbie

Original poster

Apr 22, 2022

So this command line prevents trash from being deleted in the trash bin even after hitting empty?

If, so do you have the command line to reverse this? lol

bogdanw

macrumors 68000

Mar 10, 2009

1,612

To reverse it, replace root with your username.
sudo chown liser ~/.Trash
Also, if there is nothing of value in the trash, you can delete the Trash folder and it will be recreated with the correct permissions for the user.
sudo rm -r ~/.Trash

liser k.

macrumors newbie

Original poster

Apr 22, 2022

Damn. I restarted my machine and now the trash empties regardless with the code and disk access applied to terminal and kept on. It seemed to work before this.

capuzino

macrumors regular

Jun 10, 2013

Finland

You can do this on Monterey too.
  1. Open your user folder
  2. Press CMD + SHIFT + dot (this shows the hidden folders)
  3. Locate the Trash bin
  4. Choose get info over the folder or click the trash bin folder and press CMD + I
  5. Change the permissions to read only
  6. Do step 2 again to hide hidden folders.

liser k.

macrumors newbie

Original poster

Apr 22, 2022

sadly, I can still move items to the trash bin and empty trash. I even turned on locked for the folder permission and set to read only. argh.

capuzino

macrumors regular

Jun 10, 2013

Finland

sadly, I can still move items to the trash bin and empty trash. I even turned on locked for the folder permission and set to read only. argh.
That's weird. If I follow the guide to change permissions, I can't move any files to trash without password. I can empty it without password though.

Also if I lock the folder then I can't move any files to trash or empty it. Even if my user has read & write permissions for it.

Reactions: liser k.

liser k.

macrumors newbie

Original poster

Apr 22, 2022

So, I created a new user that was a standard account and did the permissions to that trash. Eureka! BUT only for files that are on the local drive. When you add an external drive - IT's permissions trump the computers permissions of read only. You would have to set the external drive, media cards etc to read only as well to make this work fully. Unless there is a quick way to make all externals read only upon mounting.

chrfr

macrumors G4

Jul 11, 2009

11,438

5,006

I want to be able to set permissions to my trash bin like you used to do on earlier OS. My goal is - in order to move a file to the trash bin you have to enter the Admin password before completing the move.
What, exactly, is the problem you’re looking to solve by doing this?

liser k.

macrumors newbie

Original poster

Apr 22, 2022

What, exactly, is the problem you’re looking to solve by doing this?
So we have a viewing station for camera operators to take their media cards that they shot with and scrub through their footage. We are trying to create a fail safe that they don't somehow unwittingly trash footage from the card. Hence locking the trash bin from anything going in it without an admin password prompt.

chrfr

macrumors G4

Jul 11, 2009

11,438

5,006

So we have a viewing station for camera operators to take their media cards that they shot with and scrub through their footage. We are trying to create a fail safe that they don't somehow unwittingly trash footage from the card. Hence locking the trash bin from anything going in it without an admin password prompt.
Each card that gets plugged into the computer has its own trash directory, so locking down the folder in the user’s home folder will have no bearing on this. You may want to look at forensic devices, either forensic card readers or USB write blockers if this is a critical thing. Otherwise you’re really looking at a personnel solution through training, not a technological one.

Reactions: liser k.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK