# Permissions to syncthing on casaOS

**URL:** <https://community.learnlinux.tv/t/permissions-to-syncthing-on-casaos/2694>\
**Category:** Homelab\
**Created:** [June 27, 2023, 7:10am UTC](https://community.learnlinux.tv/t/permissions-to-syncthing-on-casaos/2694 "2023-06-27T07:10:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dairymilkbatman](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/d/df705f/32.png) [@dairymilkbatman](https://community.learnlinux.tv/u/dairymilkbatman)\
**Post date:** [June 27, 2023, 7:10am UTC](https://community.learnlinux.tv/t/permissions-to-syncthing-on-casaos/2694/1 "2023-06-27T07:10:26Z")

</div>

I am trying to set up a backup for my phone on a raspberry pi with raspberry OS, with casaOS and syncthing app installed on casaOS. (Removing big tech from my life!)

The raspberry has a 1TB external SSD plugged into the USB port.  
When I point the syncthing folder path to the desired folder on the SSD I get:  
2023-06-27 07:59:12: Failed to create folder root directory mkdir /export: permission denied  
and I tried this path  
2023-06-27 07:59:21: Failed to create folder root directory mkdir /srv/dev-disk-by-uuid-8e252b89-f670-417d-aac2-16273ad5a6cd: permission denied.

Apologies, there does appear to be a permissions question in the search but due to either the context or my lack of understanding - I can’t make sense of it.

How do I best handle this? SSH into rasp and change file permissions?

Kind regards

---

<div class="post-metadata">

**Author:** ![ThatGuyB](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/thatguyb/32/784_2.png) [@ThatGuyB](https://community.learnlinux.tv/u/ThatGuyB)\
**Post date:** [June 27, 2023, 11:07am UTC](https://community.learnlinux.tv/t/permissions-to-syncthing-on-casaos/2694/2 "2023-06-27T11:07:29Z")

</div>

Not sure what casaOS is, but seems like linux.

SSH to the pi, mount the ssd if it isn’t already, create a folder underneath it, probably with sudo, then change the permissions to allow others to write to it, unless you know for sure which users need write permissions.

```auto
sudo mkdir /mnt/ssd
sudo mount /dev/sda1 /mnt/ssd
sudo mkdir /mnt/ssd/syncthing
sudo chmod 777 /mnt/ssd/syncthing

```

Then point syncthing to that folder. If you know the users that need access there, create a group and change group ownership to it and permissions to 775 or lower.

---

<div class="post-metadata">

**Author:** ![dairymilkbatman](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/d/df705f/32.png) [@dairymilkbatman](https://community.learnlinux.tv/u/dairymilkbatman)\
**Post date:** [June 28, 2023, 6:22am UTC](https://community.learnlinux.tv/t/permissions-to-syncthing-on-casaos/2694/3 "2023-06-28T06:22:38Z")

</div>

Hi THatGuyB, thanks for replying.

Instead of blindly following commands, I found learnlinuxTv’s video on your suggested command and learned how it worked 🙂 was fun! however, it did not work and I received the following errors from syncthing when trying to set a custom folder on the external SSD.  
It looks like syncthing is trying to create a folder within my custom folder I pointed to - I think.

2023-06-28 07:00:32: Failed to create folder root directory mkdir /export: permission denied

2023-06-28 07:00:32: Error on folder “Syncthing” (fywyj-bzoiq): folder path missing

I also tried setting the folder to root, to user, giving rwx to user, group and world but no go ☹  
I’ll continue to search the internet and will leave a answer here if I find it.

---

<div class="post-metadata">

**Author:** ![ThatGuyB](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/thatguyb/32/784_2.png) [@ThatGuyB](https://community.learnlinux.tv/u/ThatGuyB)\
**Post date:** [June 28, 2023, 11:06am UTC](https://community.learnlinux.tv/t/permissions-to-syncthing-on-casaos/2694/4 "2023-06-28T11:06:57Z")

</div>

I thought that /export was a folder you had set up. Try to create that folder yourself manually with

```auto
sudo mkdir /export
sudo chmod 777 /export

```

This will allow syncthing to do its thing there. I don’t remember syncthing even requiring root access or creating folders outside your home, but it’s been years since I’ve used it.

---

<div class="post-metadata">

**Author:** ![dairymilkbatman](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/d/df705f/32.png) [@dairymilkbatman](https://community.learnlinux.tv/u/dairymilkbatman)\
**Post date:** [June 30, 2023, 7:13am UTC](https://community.learnlinux.tv/t/permissions-to-syncthing-on-casaos/2694/5 "2023-06-30T07:13:47Z")

</div>

Just to update the thread for future search purposes, the above didn’t work ☹  
I am scowering the syncthing forums, I’ll copy and paste a answer here - should I find one!
