I installed Android Studio in my /opt directory without a hitch and have been using it. Recently, though, Android Studio informed me of an update. It won't perform the update, however, because it says it doesn't have Read / Write permissions in the opt directory where it's installed.
Can anyone recommend the best remedy for this situation? I would prefer not to move my installation to another directory. I also don't know that I want to change permissions on the directory, though I might be tempted to do so for the update, then revert it back.
Error message:
Studio does not have write access to /opt/android-studio. Please run it by a privileged user to update
Best Answer
I changed the owner of the android studio directory from
root
to myuser
account and it worked. Here is the command, where$USER
will change by itself to your current active user: