Syncthing folder permissions (noob question)

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
hua5e34qhuae
Posts: 5
Joined: Sun Dec 29, 2019 4:01 am

Syncthing folder permissions (noob question)

Post by hua5e34qhuae »

I'm new to Syncthing and linux in general. I have Syncthing installed on a Raspberry Pi 3 B and can access the web GUI but when I try to add a folder on my external hard drive, I get the following errors:

2020-01-31 14:40:32: Loading ignores: open /media/root/USB_3TB/Share/.stignore: permission denied

2020-01-31 14:40:32: Failed to create folder root directory stat /media/root/USB_3TB/Share: permission denied

2020-01-31 14:40:32: Error on folder "Test Share" (q3anq-cvsud): stat /media/root/USB_3TB/Share: permission denied

I don't know what user I need to give permission and what permission level to grant. I've even tried using "sudo chown 777 /media/root/USB3TB/Share" to open it up entirely but that doesn't help. Thank you.
User avatar
Joulinar
Posts: 2032
Joined: Sat Nov 16, 2019 12:49 am

Re: Syncthing folder permissions (noob question)

Post by Joulinar »

Hi,

usually Syncthing will be executes as user dietpi. Therefore you would need to ensure that this user has access permission to the folder you like to write data on.

sudo chown 777 should not work as chown is the command to change the owner. But you tried to change the file system permison 777. that would be chmod 8)
  • one changes the mode and the other changes the owner.
pls can you check who is owning /media/root/USB_3TB/Share

Code: Select all

ls -l /media/root/USB_3TB/
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
hua5e34qhuae
Posts: 5
Joined: Sun Dec 29, 2019 4:01 am

Re: Syncthing folder permissions (noob question)

Post by hua5e34qhuae »

Okay. So I definitely see what chown wouldn't do what I wanted (oops). Going straight to chmod 777 seems overkill for granting permissions. The results of ls -l are below.

root@DietPi:~# ls -l /media/root/USB_3TB/
total 20
drwxrwxrwx 2 root root 16384 Jan 30 23:58 lost+found
drwxrwxrwx 3 root users 4096 Jan 31 20:39 Share
root@DietPi:~#
User avatar
Joulinar
Posts: 2032
Joined: Sat Nov 16, 2019 12:49 am

Re: Syncthing folder permissions (noob question)

Post by Joulinar »

So as now everybody has read/write permission, you still facing the issue?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
hua5e34qhuae
Posts: 5
Joined: Sun Dec 29, 2019 4:01 am

Re: Syncthing folder permissions (noob question)

Post by hua5e34qhuae »

Yes, I'm getting the same errors.
User avatar
Joulinar
Posts: 2032
Joined: Sat Nov 16, 2019 12:49 am

Re: Syncthing folder permissions (noob question)

Post by Joulinar »

did you removed the folder in Syncthing before re-trying?

pls can you check how the external hdd is mounted in dietpi-drive_manager. Usually external devices should be mounted to /mnt/. pls can you past as well output of cat /etc/fstab. Which file system format your external device has?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply