Recently when I tried to run ls command in Mac Terminal Zsh shell on macOS Big Sur, I got the below error,
code2care@mac % ls ls: .: Operation not permitted
This was really weird, I was able to fix this issue by following the below steps,
- Click on the Apple logo on Menu Bar,
- Select System Preferences...
- Click on Security & Privacy,
- Select Files & Folders,
- Under - Allow the Apps below to access files & folders, look for terminal and check - Desktop Folder, you will get the below alert,
Terminal” will not have access to files on your desktop until it is quit.
You can choose to quit “Terminal” now, or do it on your own later.
- Click on Quit & Reopen
- You will not be able to access ls and other commands in desktop.
✏️ You can get such a error while trying to access Network volumes, Download or Documents folder if the option in Files and Folders is unchecked for Terminal.
- Cut, Copy and Paste keyboard commands on mac
- [macOS] Change homepage Macbook Safari Browser
- This operation couldnt be completed. Unable to locate a Java Runtime. [macOS]
- Permanently set $PATH variable in Mac Zsh shell
- macOS Big Sur compatible Macs List
- How to make EditText text to uppercase or lowercase on macOS
- How to make macOS Terminal window Transparent (or Opaque)
- Shutdown Mac Terminal Command
- Display ls command file sizes in KB (kilobytes) MB (megabytes) or GB (gigabytes) [Linux/macOS]
- Set Python 3.8 as a default python version on macOS
- Add scroll to div element in HTML Css - CSS
- Officially Send WhatsApp message using webpage (html) - WhatsApp
- Calculate Volume of Cone - C-Program
- Install Cygwin on Windows PC to learn Objective-C - Objective-C
- Spell check not working in Gmail : Mac OS X - Mac-OS-X
- [Soluiton] You already have the latest version of Android Studio installed - Android
- How to change Chrome Spell Check from UK English to US English - Chrome
- How to See Hidden Folders and Files on Mac OS X - Mac-OS-X
- Safari appends .html extension to files that are downloaded - Mac-OS-X
- Sharepoint errors were found when compiling the workflow - SharePoint
- Chessboard with pieces using pure HTML and CSS - Html
- Simple Struts 2 Tutorial in eclipse with tomcat 7 server - Java
- bash: command not found error on macOS Terminal, Linux, Unix or Windows - MacOS
- Android Studio Change SDK Path - Android