Page 1 of 1
permission denied
Posted: Sun Sep 10, 2023 1:51 am
by jaxed7
Hello
I was trying to run syncthing as docker container on RouterOS however after installing and running I logged into the WebUI of syncthing and try to create a folder for syncing but it couldn't and I got the "/root/myPC: permission denied" error on syncthing and also "WARNING: Failed to create folder root directory stat /root/myPC: permission denied" on RouterOS log (cause I have container logging on), and It's not only syncthing basically with any container that want to create a folder within the Root Dir or Workdir that given to it or even mounts I'm getting the same problem.
Any help is highly appreciated
Re: permission denied
Posted: Tue Sep 19, 2023 2:29 pm
by antonsb
Hello,
if you are using linuxserver image - there are some steps where folder ownership is changed and Syncthing is ran under abc user.
if you set PUID and PGID to 0 - everything will run as root, and you should have folder permissions. We will check why setting correct folder ownership fails.
step by step would look something like this:
/container mounts
add dst=/config name=sync_config src=/usb1/config
add dst=/data1 name=sync_data1 src=/usb1/data1
add dst=/data2 name=sync_data2 src=/usb1/data2
/container envs
add key=TZ name=sync value=Europe/Riga
add key=PUID name=sync value=0
add key=PGID name=sync value=0
/container/add interface=sync mounts=sync_config,sync_data1,sync_data2 envlist=sync root-dir=usb1/syncthing remote-image=linuxserver/syncthing:latest logging=yes
Re: permission denied
Posted: Thu Sep 21, 2023 8:08 am
by jaxed7
@antonsb
Thanks a lot it's working now but getting the Notice: "Syncthing should not run as a privileged or system user. Please consider using a normal user account." in the Syncthing GUI.
Waiting for the fix that you said
Quick question: If a folder in ROS is shared (mounted) with two containers is it gonna cause problems? (assuming one is not gonna perform any changes to the files)
Re: permission denied
Posted: Thu Sep 21, 2023 12:45 pm
by antonsb
Mounts should work on both containers
Re: permission denied
Posted: Tue Jan 16, 2024 3:34 pm
by Larin
Hello
I was trying to run syncthing as docker container on RouterOS
Hi!
I have a few questions.
Please tell me, did you manage to successfully launch Syncthing on RouterOS?
What hardware did you run it on and does it work stably there?
Re: permission denied
Posted: Mon Jan 22, 2024 4:07 am
by jaxed7
Hello
I was trying to run syncthing as docker container on RouterOS
Hi!
I have a few questions.
Please tell me, did you manage to successfully launch Syncthing on RouterOS?
What hardware did you run it on and does it work stably there?
Hi
Yeah I did but Syncthing was showing this error that running Syncthing as root is not recommended and what not.
Yeah it was stable and was running well and the hardware was 1 core CPU and 1GB RAM and 500GB Disk (It was a QEMU VPS)