SOLVED: Ubuntu 20.10 manual install phantom unsuccessful upgrade

This makes absolutely no sense

I am running Ubuntu 20.10, I manually install syncthing from the GitHub releases so it will automatically upgrade itself

The web GUI says it’s at 1.8.0, but this is wrong - it’s at 1.9.0. I deleted /usr/bin/syncthing.old and get this from the command line:

$ /usr/bin/syncthing --version
syncthing v1.9.0 "Fermium Flea" (go1.15.1 linux-amd64) teamcity@build.syncthing.net 2020-08-28 05:48:25 UTC

I have the “upgrade to 1.9.0” button on the web GUI and clicking it yields this:

2020-09-14 08:32:28: upgrading: open /usr/bin/syncthing924203332: permission denied

Here’s where the files are located:

$ ls -la /usr/bin/syncthing
-rwxrwx--- 1 avery administrators 23489331 Sep 14 08:25 /usr/bin/syncthing

$ ls -la /home/avery/.config/syncthing
total 67
drwx------  3 avery administrators    11 Sep 14 07:52 .
drwxr-xr-x 44 avery administrators   130 Sep 14 08:24 ..
-rw-r--r--  1 avery administrators   615 Aug  2 08:06 cert.pem
-rw-------  1 avery administrators 12053 Sep 14 07:13 config.xml
-rw-------  1 avery administrators 11568 Sep 14 07:13 config.xml.v31
-rw-------  1 avery administrators   825 Aug  9 09:47 csrftokens.txt
-rw-r--r--  1 avery administrators   631 Aug  2 08:06 https-cert.pem
-rw-------  1 avery administrators   288 Aug  2 08:06 https-key.pem
drwxr-xr-x  2 avery administrators    10 Sep 14 08:31 index-v0.14.0.db
-rw-------  1 avery administrators   288 Aug  2 08:06 key.pem
-rw-r--r--  1 avery administrators  1032 Aug  2 08:43 syncthing.log

I have tried running syncthing as root and upgrading it, but I still get the same error about permissions.

I figured it had something to do with the $HOME/.config/syncthing directory, but it’s all owned by me. Also, I have changed ownership to the other ancillary files, so I would assume they could be upgraded if necessary, but I think this is getting kind of sloppy - I don’t know why it wouldn’t have upgraded it when run as root, regardless of where the files were located and their folder permissions.

The REAL weird thing is it reports that it’s 1.9.0 in the terminal, but the web GUI still says 1.8.0. Has anyone ever seen this before? It’s just bizarre.

I have successfully done this with another Ubuntu 20.04 machine, but I edited the syncthing.service file to reflect a single user, since nobody else uses the machine. It upgrades automatically without issue. On the machine I’m having issue with I’m using the syncthing@avery.service instead of a syncthing.service modified to reflect one user.

If anyone has any ideas, please let me know. Thanks!

Edit: One last thing - I actually downloaded 1.9.0 from GitHub and copied the syncthing binary to /usr/bin, overwriting the old file, and I’m STILL experiencing this issue.

One more edit: I just saw this when I tried upgrading from the command line:

$ /usr/bin/syncthing -upgrade
08:51:01 WARNING: Upgrade: no upgrade available (current "v1.9.0" >= latest "v1.9.0").

I’m getting spooked out at this point…

Did you restart it after upgrade?

The permission error is because the user you run it as doesn’t have write permissions on /usr/bin. It’s not the best place for auto upgrading binaries.

Yes, I literally just rebooted and now the web GUI reflects the 1.9.0 upgrade.

Jeesh, I can’t believe I wasted 2 hours of my life on this. I’m going to move the binary to a user folder and create a symlink. Hopefully this won’t creep me out ever again.

Thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.