Community discussions

MikroTik App
 
jaxed7
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 53
Joined: Wed May 17, 2023 11:15 pm

permission denied

Sun Sep 10, 2023 1:51 am

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
 
User avatar
antonsb
MikroTik Support
MikroTik Support
Posts: 397
Joined: Sun Jul 24, 2016 3:12 pm
Location: Riga, Latvia

Re: permission denied

Tue Sep 19, 2023 2:29 pm

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
 
jaxed7
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 53
Joined: Wed May 17, 2023 11:15 pm

Re: permission denied

Thu Sep 21, 2023 8:08 am

@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 :D

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)
 
User avatar
antonsb
MikroTik Support
MikroTik Support
Posts: 397
Joined: Sun Jul 24, 2016 3:12 pm
Location: Riga, Latvia

Re: permission denied

Thu Sep 21, 2023 12:45 pm

Mounts should work on both containers
 
User avatar
Larin
just joined
Posts: 16
Joined: Tue Mar 31, 2009 6:05 am
Location: Canada
Contact:

Re: permission denied

Tue Jan 16, 2024 3:34 pm

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?
 
jaxed7
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 53
Joined: Wed May 17, 2023 11:15 pm

Re: permission denied

Mon Jan 22, 2024 4:07 am

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)

Who is online

Users browsing this forum: No registered users and 7 guests