45

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.

Kara
  • 6,115
  • 16
  • 50
  • 57
Gregg
  • 34,973
  • 19
  • 109
  • 214

16 Answers16

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

these commands work recursively and fix the trouble

muru
  • 4,723
  • 1
  • 34
  • 78
Anton
  • 761
  • 5
  • 3
  • 1
    Thanks, the other answered didn't work for me but this worked! – Evgeni Jan 18 '18 at 17:58
  • Works for me. also ensure that you're starting IDEA from exactly that location. – s1m0nw1 Aug 09 '18 at 12:44
  • 11
    This answer also works for the latest version of IntelliJ IDEA (2018.3.x) on macOS Mojave. I have the Ultimate edition instead of the community edition, so the commands were: `sudo xattr -dr com.apple.quarantine /Applications/IntelliJ\ IDEA.app/` `sudo chmod -R 777 /Applications/IntelliJ\ IDEA.app/` – Scott Lawrence Feb 05 '19 at 18:50
  • 4
    For WebStorm the commands are following: `sudo xattr -dr com.apple.quarantine /Applications/WebStorm.app/ && sudo chmod -R 777 /Applications/WebStorm.app/` – vitalets Apr 19 '19 at 15:27
  • 1
    Similarly for pycharm: ```sudo xattr -dr com.apple.quarantine /Applications/PyCharm.app/ && sudo chmod -R 777 /Applications/PyCharm.app/``` – eldad levy Jun 29 '20 at 14:03
  • 1
    Thanks, this solution worked for me as well. Should be marked as the best response. – Server Khalilov Mar 25 '21 at 15:20
  • Mine is `IntelliJ\ IDEA\ CE.app` now – Grzegorz Oledzki Aug 08 '22 at 05:36
  • I got `xattr: [Errno 1] Operation not permitted`. – thinkman Mar 28 '23 at 21:58
  • Great! Used this on OSX version 12.6.5 to allow Pycharm and Datagrip to do in-app updating. – SWPhantom Jun 23 '23 at 19:54
43

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
muru
  • 4,723
  • 1
  • 34
  • 78
Sean Riley
  • 439
  • 4
  • 3
  • 5
    Worked like a (Py)charm! Thank you! – George Sibble Apr 13 '17 at 20:11
  • 2
    Worked for me. I had to run this: 'cd /Applications && xattr -d com.apple.quarantine IntelliJ\ IDEA.app` and then restart IntelliJ – Grogs May 17 '17 at 20:56
  • Just an additional comment: If (like me) your domain user had changed, you will also have to re-set permissions IN ADDITION to the trick above. – big.nerd Jun 27 '17 at 15:49
  • 13
    I think it changed in newer versions: `$ sudo xattr -d com.apple.quarantine IntelliJ\ IDEA\ CE.app/` ==> `xattr: IntelliJ IDEA CE.app: No such xattr: com.apple.quarantine` – Innokenty Aug 01 '17 at 14:01
  • 2
    No such file... I'm using Mojave 10.14.1 – GarfieldKlon Mar 19 '19 at 15:35
31

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!

Lorenzo Battilocchi
  • 862
  • 1
  • 10
  • 26
24

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

sudo chmod -R 775 /Applications/IntelliJ IDEA.app/Contents/
axnet
  • 5,146
  • 3
  • 25
  • 45
16

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...

Daniel
  • 171
  • 1
  • 6
5

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!

nevster
  • 6,271
  • 7
  • 35
  • 42
3

I prefer to use this CLI command to update everything.

$ brew cask reinstall intellij-idea.

handlerFive
  • 870
  • 10
  • 23
1

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.

nosequeweaponer
  • 511
  • 10
  • 38
1
sudo chmod -R 777 IntelliJ\ IDEA\ CE.app/

this command works for the newer versions

1

Similar for GoLand, find your Goland app dir

sudo xattr -dr com.apple.quarantine /Applications/GoLand.app 
sudo chmod -R 777 /Applications/GoLand.app
zeroc00l
  • 61
  • 1
  • 4
1

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/
Mehdi
  • 41
  • 2
1

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.
Vikas Sharma
  • 685
  • 8
  • 18
0

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.

Gregg
  • 34,973
  • 19
  • 109
  • 214
  • Of all great answers below, this is not the right one to pin as the solution :) For everyone reading this, please, scroll down. – Daniel Gannota Jun 07 '21 at 06:51
0

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.

0

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

JeanValjean
  • 17,172
  • 23
  • 113
  • 157
0

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.

KKP
  • 197
  • 1
  • 3
  • 11