Permissions to syncthing on casaOS

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

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.

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.

Hi THatGuyB, thanks for replying.

Instead of blindly following commands, I found learnlinuxTv’s video on your suggested command and learned how it worked :slight_smile: 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 :frowning:
I’ll continue to search the internet and will leave a answer here if I find it.

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

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.

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