Recently when I tried to run ls command in the 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 on the desktop.
βοΈ You can get such an error while trying to access Network volumes, Download, or Documents folder if the option in Files and Folders is unchecked for Terminal.
More Posts related to MacOS,
- How to show line numbers in Nano on Mac
- How to install Jupyter Notebook on macOS Sonoma
- How to Disable Remote Management using Mac Terminal
- Test internet speed using macOS Terminal command
- Docker Desktop needs privileged access macOS
- Google Search Hot Trends Screensaver for Mac OS X
- How to do calculations in Mac Terminal
- How to make TextEdit the default text Editor on Mac
- How to Show Full Website Address on Safari for Mac (Ventura/Sonoma)
- The Zsh Shell - Mac Tutorial
- Opening mac Terminal
- How to change the name of your Mac running on macOS Ventura 13
- How to find the Battery Cycle Count on macOS Ventura
- How to set an emoji as Zsh terminal prompt in macOS
- How to access Trash Folder using Mac Terminal Command
- macOS Ventura XCode Command Line Tools Installation
- Hide Bluetooth icon on Mac Menu Bar macOS Ventura 13
- How to run .sh file in Mac Terminal
- Terminal Command to get the list of available shells in macOS
- How to see Storage Information on macOS Ventura
- How to Go To /usr/local/bin on Mac Terminal?
- How to do screen recording on Mac
- How to Find File and Directory Size in Mac Terminal
- Open .bash_profile File in TextEdit using Terminal
- Remove Now Playing icon from macOS Big Sur Menu Bar
More Posts:
- [Working] Steps to Install Windows 10/11 on M1/M2 Mac using a Free VM - MacOS
- Check CPU Usage using Mac Terminal Command - MacOS
- URL Encode cURL HTTP GET\POST Data with Examples - cURL
- Python: Traverse List Backwards - Python
- Fix [Fatal Error] :2:6: The processing instruction target matching [xX][mM][lL] is not allowed. - Java
- zsh: command not found: cls macOS Big Sur - MacOS
- Install Java 17 (LTS) JDK on ARM based M1/M2 Mac Natively - MacOS
- Java StringJoiner vs StringBuilder - Java