#816 Update mechanism in linux tricks user.

Squirrel SQL
Rob Manning

Update mechanism tries to download update file and fails, if Squirrel SQL is not running under root account. (Squirrel was installed by root)
This would be fine, however error msg tricks user by showing "Release file couldn't be downloaded. Please check your settings.", however settings are completely fine. When you check settings, error msg after "Test connection" says: "Unable to download release.xml from the specified location". However from stacktrace it is obvious, that it was rights issue:
java.io.FileNotFoundException: /opt/SQuirreL SQL Client/update/downloads/release.xml (Permission denied)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at net.sourceforge.squirrel_sql.fw.util.IOUtilitiesImpl.copyBytesToFile(IOUtilitiesImpl.java:154)
at net.sourceforge.squirrel_sql.fw.util.IOUtilitiesImpl.downloadHttpFile(IOUtilitiesImpl.java:298)
at net.sourceforge.squirrel_sql.client.update.UpdateUtilImpl.downloadHttpUpdateFile(UpdateUtilImpl.java:871)

I'd propose to download update file to home folder, and if there is new update, notify user that he should start Squirrel SQL as root (or msg about insufficient rights), if he needs to update it.


  • Rob Manning
    Rob Manning

    In this case, you probably don't want unprivileged users even attempting to update the software. You should disable automatic updates, and run as root occasionally and use the software update feature to check for updates manually. I will keep this bug open because the error message could indicate that the release.xml file wasn't writeable.


  • kockas

    Exactly my point. Not allwed update is perfectly fine and no need for some workaround. Just Error message should be more clear as I wrote in ticket, or make one step further as I proposed... Not crash on update detection, but only fail, when update is available and no rights are in the place...