Restore terminal access to Dropbox on macOS

Dropbox just updated and moved the Dropbox folder to ~/Library/CloudStorage/Dropbox, a secure location. There is still a symlink from ~/Dropbox to that folder, so hopefully any local scripts will continue working.

The first thing I did was open an iTerm2 and attempt to look in ~/Dropbox with cd Dropbox. As it is hard-coded in my brain, when I change to a new directory, I will want to see what’s in it, so I immediately typed ls -l. Too fast for my own good, as I noticed the flicker of a dialogue appear and disappear when I tapped the return key.

~/Dropbox » ls
ls: cannot open directory ‘.’: Operation not permitted

I had denied iTerm2 access to the Dropbox directory. Oops.

Thankfully, it’s easy to fix. Open up the Security & Privacy settings in System Preferences. Go to the Privacy tab.

Click on Files and Folders and scroll down to your terminal programme.

You’ll see a new checkbox there for Dropbox. Click the lock to authenticate and click the Dropbox checkbox.

Go back to your terminal, and you’ll be able to see what’s in ~/Dropbox once again.

Leave a Reply

%d bloggers like this:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close