Gregg
Gregg

Reputation: 35894

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.

Upvotes: 53

Views: 56615

Answers (18)

Vishal Vasnani
Vishal Vasnani

Reputation: 551

For Mac,

Go to System Settings > Privacy & Security > App Management

  • Enable JetBrains Toolbox in the list
  • If not present, add JetBrains Toolbox in the list and restart the Toolbox

Upvotes: 1

Huseyin Yagli
Huseyin Yagli

Reputation: 10295

All of the above workarounds caused other problems in my case. The best solution for me was to use the Jetbrains Toolbox application. It updated my IntelliJ Idea to 2023.3.2 and fixed the errors for me.

https://www.jetbrains.com/toolbox-app/

Upvotes: 1

Lorenzo Battilocchi
Lorenzo Battilocchi

Reputation: 1168

I know this is quite an old post, but I found a quick solution in MacOS.

  1. Navigate to your .app file, and view the contents of it.

  2. Right click on the "Contents" folder, and go to "Get Info".

  3. Hit the Lock (🔓) icon to enable changes and enter your user password

  4. In the permissions section, select "Read & write" for each element.

  5. Click the three dots (...) icon and select "Apply to enclosed files and folders".

  6. Restart IntelliJ.

This solved the problem for me, hope it helps others too!

Upvotes: 61

Vikas Sharma
Vikas Sharma

Reputation: 735

For macOSBigSur(Apple M1) I have solved by giving write permission to the Contents folder in IntelliJ.

1. From Finder click on Applications and search for IntelliJ IDEA CE. 
   Right-click on it and select show package contents options.
2. Right-click on the Contents folder and select Get Info.
3. Navigate to Sharing & Permissions and change the permission to Read/Write 
   for other users.
4. Click on the Settings icon(with three dots) at the bottom and 
   select Apply to enclosed items... to give the same permission 
   for all the folders and files inside the Contents folder.

Upvotes: 4

Mehdi
Mehdi

Reputation: 81

You need to go to the Applications directory (on root) and give the rights to IntelliJ IDEA to read, write and execute its files.

sudo chmod -R 777 IntelliJ\ IDEA.app/

Upvotes: 4

Daniel
Daniel

Reputation: 401

I faced the same problem while updating IntelliJ IDEA in Mac OS Catalina. Actually it's a problem with folder permissions. I followed the steps below and the upgrade was successful.

  1. Open Finder and click on Applications in the left side pane.
  2. Find IntelliJ IDEA and do right click and select Show Package Contents.
  3. Right click on the displayed Contents folder and select Get Info.
  4. In the opened dialog box expand Sharing and Permissions section.
  5. Then look for a pad lock icon at the right bottom.
  6. Click on the pad lock icon to unlock it using Touch ID or Password to change permissions.
  7. Look at the Sharing and Permissions section, Read & Write will be there only for system and Read only will be there for other users(Admin/Everyone).
  8. So change the permission to Read & Write for other users too(Admin/Everyone).
  9. Click the settings icon(Gear Icon) in the bottom and choose Apply to enclosed items... to make same permission settings for all the folders/files inside the Contents folder.
  10. Then close the dialog box.
  11. Open IntelliJ IDEA, in menu bar select IntelliJ IDEA->Check for Updates... to update.

Now it will update without any errors...

Upvotes: 29

zeroc00l
zeroc00l

Reputation: 59

Similar for GoLand, find your Goland app dir

sudo xattr -dr com.apple.quarantine /Applications/GoLand.app 
sudo chmod -R 777 /Applications/GoLand.app

Upvotes: 1

axnet
axnet

Reputation: 5790

If you face this issue in MacOS Mojave, then you should execute following command:

sudo chmod -R 775 /Applications/IntelliJ IDEA.app/Contents/

Upvotes: 28

Abhishek Singha
Abhishek Singha

Reputation: 79

sudo chmod -R 777 IntelliJ\ IDEA\ CE.app/

this command works for the newer versions

Upvotes: 1

nosequeweaponer
nosequeweaponer

Reputation: 678

I had the same problem, the only thing that I do was the next:

$ brew cask reinstall intellij-idea.

After that I open the IntelliJ and select the option related with import previous config.

That new version is able to be updated.

Upvotes: 1

KKP
KKP

Reputation: 307

It helped me to just use the Jetbrains Toolbox to do the whole upgrade. Worked like a charm, didn't need any command line incantations or mucking about with OS folders.

Upvotes: 1

JeanValjean
JeanValjean

Reputation: 17713

It happened to me as well on my Mac Os. The problem is that IntelliJ was mounted as a disk image at every start. I added to the application menu bar the installer or I don't know what. I then started the app from the application list and the problem was solved. So be sure you are not mounting an image

Upvotes: 0

atreyHazelHispanic
atreyHazelHispanic

Reputation: 109

Finder or it's menu bar (Go)
Open Applications
Ctrl+Click (right-click) PyCharm (jetbrains .app)
click get info
at the bottom, expand permissions
unlock the padlock
change all three to "read&write" to allow app to make changes to sys
lock the padlock
restart the application

There were several engineers stating the "systemtools" had to be updated in the virtual environment whether by pip or interpreter pckg mgr.

For me, it turned out to be the fact that the imports were supposed to be local, thus be pulled from the repo.

Upvotes: 0

I prefer to use this CLI command to update everything.

$ brew cask reinstall intellij-idea.

Upvotes: 3

Sean Riley
Sean Riley

Reputation: 537

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

Upvotes: 42

Anton
Anton

Reputation: 797

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

these commands work recursively and fix the trouble

Upvotes: 78

nevster
nevster

Reputation: 6465

I've just encountered something very similar while testing jar updates with my app AuctionSieve.

The problem occurs when you run the app from the Downloads folder and try to do the update - it gets FileNotFoundExceptions because the entire folder macOS creates under /private/var/folders is a read-only filesystem. You can't change the permissions of the files at all.

Moving the app from the Downloads folder to the Applications folder solved the problem!

Upvotes: 5

Gregg
Gregg

Reputation: 35894

So after talking to Jetbrains support, there's nothing that can be done as they can't duplicate the issue and not enough people have reported it. The patch process doesn't work but you can just download the latest version. Problem solved.

Upvotes: 0

Related Questions