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.
- Clear Screen shortcut macOS Terminal
- What is macOS Ventura?
- [fix] How to Show file extensions on all files on Mac
- How to Find Where Mac Terminal App is Located?
- AutoSave button not working on Office on Mac (Word, Excel or Powerpoint)
- macOS say command text to speech using various voices and languages
- How to change Ping TTL value on macOS
- Open .bash_profile File in TextEdit using Terminal
- How to know the Safari Version on Mac
- How to Copy full Absolute Path of a File on Mac
- 13.0 MacOS Ventura release date
- Enable spell check in Sublime Text (macOS)
- How to Display Analog Clock on Mac Menu Bar
- How to turn off Location Services macOS Ventura 13
- How to Open VS Code on Mac
- Add Bookmark macOS Safari
- How to Fix cd: too many arguments Error in Terminal: A Step-by-Step Guide
- How to install wget on macOS
- Select Line Number TextEdit on Mac
- Strikethrough Text in Excel for Mac
- How to Enable or Disable Dark Mode on macOS Ventura 13
- How to hide or display Wifi icon in macOS Bug Sur Menu Bar
- How to install Yarn on Mac (macOS)
- How to fix command not found brew (bash, zsh) on macOS Terminal
- How to Schedule Mails in macOS Ventura
- [Program] How to read three different values using Scanner in Java - Java
- Xcode 13 - unknown error compiling for iOS 15.0 but module has a minimum deployment target of iOS 15.2 - iOS
- Fix: Mac Screenshot opens in Mail Application - MacOS
- [fix] zsh: command not found: telnet on Mac - MacOS
- pip get list of all outdated Python packages - Python
- 5 Reasons Why Jupyter Notebook is Not Opening and Solutions - Python
- How to wrap column text in SharePoint Online Modern List Grid View using JSON formatting - SharePoint
- Java: Print Stack Trace as String Without Exception - Java