Fixed: PyCharm automatic update fails on Linux due to permissions

Users frequently post that they were unable to update Pycharm via the usual auto-update from within the program on Ubuntu or similar Linux systems.  They start the update process but they get a message showing many permission failures.

I have seen it suggested to simply download and install the full new PyCharm version as a solution, but this creates an unnecessary new program folder and requires export and import of your user settings, and your previous desktop entry (launcher) still points to the old version.

An incorrect solution is to change the program folder from root to user permission (don't do this).  The normal places to place PyCharm on your system are either /usr/local/bin or /opt/, and these are system folders that should keep their root permissions.  PyCharm runs fine (as your ordinary user account) without changing permissions on its folder.

Normally you do not want to run PyCharm as root, even though its folder and subfolders have root permissions.  This is because you want your PyCharm settings to be associated with your ordinary user account, not with the root account.

But there is one exception.  Run PyCharm as root in just the case where you are running it to do an automatic update to a new version.

sudo updatedb && sudo locate
sudo /path/to/
prettyPrint(); Don't do anything else during that session, just apply the update.  Then close PyCharm and reopen normally, and you should find you are running the new version with no need to download or mess with folder permissions.
1 comment
Comment actions Permalink

Awesome fix, thank you so much.


Please sign in to leave a comment.