Permission denied on mounted drive - systemd issue?

Syncthing works wonderfully to sync my photos etc. from my phone. :slight_smile:
Now I wanted to sync some files to a mounted HD to save space on the OS SSD. (Ubuntu 18.04)

I create a folder in the web gui “/media/gaute/snurre/foo” where “snurre” is the mounted drive, but I get a “permission denied” notice on start.

ps aux shows:

gaute 29448 0.6 0.8 191848 63864 ? Ssl 16:17 0:20 /snap/syncthing/448/syncthing -no-browser -no-restart -logflags=0 -home=/home/gaute/snap/syncthing/common/syncthing/

And mkdir /media/gaute/snurre/foo works perfectly.

I believe the contents of syncthing.service are the defaults from the snap.

The mount was created with the Ubuntu Disks application and looks like this.

/dev/sdb on /media/gaute/snurre type ext4 (rw,nosuid,nodev,relatime,data=ordered,x-gvfs-show)`

I’m starting to think this has to be some sort of systemd fuckery.

Any ideas are appreciated!

One can never rule out systemd fuckery. Does it work if you stop the systemd service and start Syncthing manually?

That was quick :smiley:

Didn’t think to try that, but nope:

WARNING: Failed to create folder root directory mkdir /media/gaute/snurre/bar: permission denied

Nice to have the log like that though.

Maybe this could be relevant?

/media/:
drwxr-x—+ 3 root root 4096 feb. 4 12:17 gaute/
/media/gaute/:
drwx------ 8 gaute gaute 4096 feb. 4 17:23 snurre/

I tried chmod g+rwx /media/gaute/snurre just in case, but no luck. mkdir works after all…
The service file should not be relevant when it fails on manual start.

If syncthing can’t create that dir when started from a shell I would expect you to also not be able to mkdir it from the same shell? Otherwise I don’t know what’s going on.

Exactly!
That should take systemd completely out of it.
I just rsynced my entire Photos folder over from this shell without issue in fact.

I did not mount the hdd the “traditional way”, I used the gui, that’s the only thing I can think of.

snap fuckery? try running the Linux binary from GitHub to check

1 Like

snap fuckery indeed!

Pulled the binary out of syncthing-linux-amd64-v1.3.4.tar.gz
Ran:

~/tmp$ ./syncthing -no-browser -no-restart -logflags=0 -home=/home/gaute/snap/syncthing/common/syncthing/

And it just works :slight_smile:

stick to .deb is the moral I guess.

Oh, snap! Missed that detail; those are indeed heavily sandboxed.

1 Like

:grin:

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