Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

markiv810

macrumors 6502
Original poster
Sep 27, 2002
379
114
India
I am not able to use any Unix commands on Desktop. I get the error "ls: .: Operation not permitted"
 

Attachments

  • Screenshot 2022-01-10 at 11.42.27 PM.jpg
    Screenshot 2022-01-10 at 11.42.27 PM.jpg
    31 KB · Views: 111

BigBlur

macrumors 6502a
Jul 9, 2021
807
940
Make sure Terminal has access to the Desktop folder (System Preferences -> Security & Privacy -> Privacy -> Files and Folders).

Screen Shot 2022-01-10 at 1.02.26 PM.png
 
  • Love
Reactions: markiv810

BigBlur

macrumors 6502a
Jul 9, 2021
807
940
Thanks a million, but why would Apple do this. Terminal should have access to each and every file and folder; specially home folder and subfolders (to one's home folder).
My guess it's a security thing for the average user that might not use Terminal frequently...so scripts can't access these folders. I first noticed it in Big Sur, but apparently it began since Mojave. If you use Terminal a lot, another option would be to just give Terminal Full Disk Access rather than specifying individual folders.
 
  • Love
Reactions: markiv810
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.