1

Having come from a Linux environment, I am accustomed to using the command line, as in MacOS's "Terminal". In particular, I know about permissions, "sudo" and such.

But I am unable to perform any operations whatsoever via the command line on the .Trash file in my home directory. (I do have admin privileges on the machine.) I can "ls -al" my home directory...

However, I can see (and copy, deleted, etc.) the contents of my .Trash file via Finder, and could apparently manipulate its permissions. But, seemingly, nothing I can do with finder makes .Trash accessible via Terminal.

Can anyone explain?

2
  • 1
    Yes, it's a protected folder. Give Terminal full disk access. Commented Feb 10, 2022 at 23:35
  • @MarcWilson, I seem unable to figure out on my own what "giving Terminal full disk access" would mean. Advise, please? :) Commented Feb 10, 2022 at 23:38

1 Answer 1

0

Googling about how to "give Terminal full disk access", led me to another answer on this site, Is there command to grant Full Disk Access for specific application?

The wording was not obvious to me. :)

To repeat that other answer: under System Preferences > Security and Privacy, one of the sub-headings is Full System Access, with a list of potential parent processes that may or may not be granted this. So I added "Terminal.app" there (did not have to figure out how to type in a suitable format, but, rather, could choose from a list).

Testing: this does allow me (without sudo but as user with admin privileges), to ls .Trash, remove files, etc.

EDIT: "problem" solved, though I could already manipulate nearly every other file on the machine via sudo, so the recalcitrance of .Trash was one-of-a-kind (according to my expectations, anyway).

4
  • You don't need admin privileges to see your own .Trash - as for other directories without Full DIsk Access try anything outside you $HOME and ~/Library
    – mmmmmm
    Commented Mar 13, 2022 at 22:28
  • @mmmmmm, yes, I could see my own .Trash through Finder, but not through Terminal or Aquamacs... Commented Mar 13, 2022 at 22:50
  • My comment was about your comment re not sudo
    – mmmmmm
    Commented Mar 13, 2022 at 22:51
  • Ah, thx, ... :) Commented Mar 13, 2022 at 22:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .