Full Disk Access
When iTerm2 launches for the first time on macOS 10.14 or later, it checks if it has "full disk access". If it does not, you'll be asked to give it access.
Some files on your Mac belong to protected categories. These files cannot be accessed by other applications. This is meant to protect your privacy—for example, it makes it impossible for a program you download to access your Safari data by default.
Examples of some protected files include
/etc/exports. If you'd like to back up the entire contents of your home directory in iTerm2 (e.g., with
tar), you'll have problems because that will include some protected folders: for example,
To solve these problems, you'll need to grant iTerm2 full disk access. When it does not have access, programs will either crash or print cryptic errors.
Note that UNIX permissions (file ownership and access permission bits as set with
chmod, respectively) are still enforced when Full Disk Access is granted. Full Disk Access is a backstop that keeps certain files private even from users with root access.
For more information, please see Why Full Disk Access?.
Step 1: Open System Preferences.
Step 2: Click on Security & Privacy.
Step 3: Choose the Privacy tab.
Step 5: Click the lock if it is locked.
Step 6: Click on Full Disk Access on the left.
Step 7: Click the + button.
Step 8: Select iTerm2 in the file picker that opens.
Step 9: Click Open. You will be asked to quit iTerm2. Close your work and then choose Quit Now.
Step 10: Verify that iTerm2 appears in the list. It will now have full disk access.