# Permission denied on mounted drive - systemd issue?

**URL:** https://forum.syncthing.net/t/permission-denied-on-mounted-drive-systemd-issue/14456
**Category:** Support
**Created:** [February 4, 2020, 4:34pm UTC](https://forum.syncthing.net/t/permission-denied-on-mounted-drive-systemd-issue/14456 "2020-02-04T16:34:12Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Gaute](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/g/e19adc/32.png) [@Gaute](https://forum.syncthing.net/u/Gaute)
#### Post date: [February 4, 2020, 4:34pm UTC](https://forum.syncthing.net/t/permission-denied-on-mounted-drive-systemd-issue/14456/1 "2020-02-04T16:34:12Z")

</div>

Syncthing works wonderfully to sync my photos etc. from my phone. 🙂  
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!

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [February 4, 2020, 4:42pm UTC](https://forum.syncthing.net/t/permission-denied-on-mounted-drive-systemd-issue/14456/2 "2020-02-04T16:42:19Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Gaute](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/g/e19adc/32.png) [@Gaute](https://forum.syncthing.net/u/Gaute)
#### Post date: [February 4, 2020, 4:51pm UTC](https://forum.syncthing.net/t/permission-denied-on-mounted-drive-systemd-issue/14456/3 "2020-02-04T16:51:06Z")

</div>

That was quick 😃

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.

---

<div class="post-metadata">

### Author: ![Gaute](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/g/e19adc/32.png) [@Gaute](https://forum.syncthing.net/u/Gaute)
#### Post date: [February 4, 2020, 5:04pm UTC](https://forum.syncthing.net/t/permission-denied-on-mounted-drive-systemd-issue/14456/6 "2020-02-04T17:04:31Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [February 4, 2020, 5:07pm UTC](https://forum.syncthing.net/t/permission-denied-on-mounted-drive-systemd-issue/14456/7 "2020-02-04T17:07:15Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Gaute](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/g/e19adc/32.png) [@Gaute](https://forum.syncthing.net/u/Gaute)
#### Post date: [February 4, 2020, 5:19pm UTC](https://forum.syncthing.net/t/permission-denied-on-mounted-drive-systemd-issue/14456/8 "2020-02-04T17:19:59Z")

</div>

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.

 ![image](https://forum-uploads.syncthingcdn.net/original/2X/9/9f9295ae580c2eb523a33597ba22fdf3461784cc.png)

 ![image](https://forum-uploads.syncthingcdn.net/original/2X/0/06ce7d035626f65390501793aaf487305719c50a.png)

---

<div class="post-metadata">

### Author: ![imsodin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/imsodin/32/3317_2.png) [@imsodin](https://forum.syncthing.net/u/imsodin)
#### Post date: [February 4, 2020, 7:22pm UTC](https://forum.syncthing.net/t/permission-denied-on-mounted-drive-systemd-issue/14456/9 "2020-02-04T19:22:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Gaute](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/g/e19adc/32.png) [@Gaute](https://forum.syncthing.net/u/Gaute)
#### Post date: [February 4, 2020, 7:59pm UTC](https://forum.syncthing.net/t/permission-denied-on-mounted-drive-systemd-issue/14456/10 "2020-02-04T19:59:36Z")

</div>

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 🙂

stick to .deb is the moral I guess.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [February 4, 2020, 8:16pm UTC](https://forum.syncthing.net/t/permission-denied-on-mounted-drive-systemd-issue/14456/11 "2020-02-04T20:16:31Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Gaute](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/g/e19adc/32.png) [@Gaute](https://forum.syncthing.net/u/Gaute)
#### Post date: [February 4, 2020, 8:55pm UTC](https://forum.syncthing.net/t/permission-denied-on-mounted-drive-systemd-issue/14456/12 "2020-02-04T20:55:05Z")

</div>

😁

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [March 5, 2020, 8:55pm UTC](https://forum.syncthing.net/t/permission-denied-on-mounted-drive-systemd-issue/14456/13 "2020-03-05T20:55:08Z")

</div>

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