Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading IntelliJ IDEA after Sierra Upgrade: does not have write access to /private/var

Trying to upgrade Intellij IDEA from 2016.2 to 2016.2.5 and I am getting this error:

IDEA does not have write access to /private/var/folders/_q/7md3pcy10x9cxjdt9nzxjvdr0000gn/T/AppTranslocation/97E0DA6A-73B2-4439-91AE-F7DD0353F063/d/IntelliJ IDEA.app/Contents

I can't modify the permissions of that folder because it is read-only. I've tried chown and chmod as root, neither of which work.

like image 817
Gregg Avatar asked Oct 25 '16 23:10

Gregg


People also ask

How do I run IntelliJ as privileged user?

In the user field, type the username. You can press Ctrl+Space to use code completion in this field. Click the grant field, from the drop-down near each privilege, select Grant or Grant with option. The Grant with option privilege means that a user can grant to or revoke from other users those privileges.

How do I change permissions in IntelliJ?

Open that file by Finder. Right click and select Get Info. In that File Info window, select Sharing and Permissions , change Privilege as you expected.

How do I fix my IntelliJ idea?

From the main menu, select File | Repair IDE. IntelliJ IDEA will automatically launch the first recovery step and refresh the virtual file system. IntelliJ IDEA will display a notification that you can use to continue or complete the recovery process.

How do I switch between IntelliJ projects on a Mac?

If you have several opened projects at the same time, you can switch between them using the following options: Switch to the next project window: Ctrl+Alt+] (Window | Next Project Window) Switch to the previous project window: Ctrl+Alt+[ (Window | Previous Project Window)


2 Answers

sudo xattr -dr com.apple.quarantine IntelliJ\ IDEA.app/ sudo chmod -R 777 IntelliJ\ IDEA.app/ 

these commands work recursively and fix the trouble

like image 120
Anton Avatar answered Sep 28 '22 15:09

Anton


This is happening because of some new security feature in Sierra. I found some information about it here http://lapcatsoftware.com/articles/app-translocation.html

The work around I used was to go to the Application directory where the Intellij app was and delete the xattr com.apple.quarantine from the app. This stops the app from opening up in that read only directory.

ex.

xattr -d com.apple.quarantine IntelliJ\ IDEA.app 
like image 21
Sean Riley Avatar answered Sep 28 '22 16:09

Sean Riley