Feature Request: Option to turn off warning "Syncthing should not run as a privileged or system user."

I do understand the motivation behind the warning and the need to warn people who are maybe not aware the issue. But there is also a fair chance that people with priviledged accounts know what they do and I respectfully ask to give them a choice to silence the warning.

Syncting is small and nimble, easily installed and more or less maintenance free when configured correctly. That makes it ideal to regularly sync configs or data from and to devices that have only a limited environment. Unfortunately user management is often missing, and in that cases the (correct) warning about Syncthing running as privledged user is displayed. Again and again.

1 Like

Well, apart from the fact that now all of your users’ files are owned by a privileged or system user, so they can’t access them…

Advanced Settings -> Insecure Admin Access is the best you can do.

Maybe I did not express myself correctly: On a system where there is only one account, may it be called system, admin, root, whatever, there is only one account with which to install Syncthing. The files do belong to root, admin, system anyway. No problem here.

I’ve tried “Insecure Admin Access” before but it did not supress the warning. It just gives me the screenshot below:

It’s a one-off after restart. There is no way to complete silence it, and I don’t think there should be. Running a network application as a superuser is a big nono.

2 Likes

I have 2 devices running with this case, but I don’t feel it’s annoying. On the gui for the first, I receive the advice only once, and on the other it isn’t even displayed if I use the -no-browser option. Why does it bother you ?

1 Like

Ah, forget ist. Thanks Bruno.

In some cases it has to be run as root. Say…you want to sync a Linux folder that’s shared out via Samba. User ‘bob’ saves a file to it. The owner is ‘bob’ and the group is ‘domain users’. The file has permissions 0660. All the domain users can do whatever they want with the file, but Syncthing can’t touch it.

Plus there’s this:

You can lock syncthing down quite a bit using apparmor–even if it’s running as root…so please provide a way for competent admins to disable this stupid warning.

2 Likes

You can grant the relevant capabilities in a more fine grained manner, which won’t trigger the large warning.

What ‘fine grained’ manner am I missing? Further configuration with apparmor or something?

I was thinking of using setcap to grant the binary the relevant capability. Maybe cap_dac_override to be root-like.

1 Like

There are some Linux devices which have only root user (/etc is read-only do no further users can be created). In this case, it would be helpful to hide the message.

1 Like

You know, i agree seeing this constantly after making the conscious choice to have it setup this way…is super annoying. I don’t feel like a turn this off option is too much to ask. My practices may not be best, but they are what i want in the moment. What I also want is for it to work without a big yellow banner that won’t change my practices, but does anoy me because it could be telling me something important like a broken disk or conncection or something, but now i don’t read the flippin warning because they all say the same irrelevant thing and now i spank that go away button so now it’s just a cry-wolf situation.

and it hurts nothing to have the option.

At the moment, your best bet without modifying the source code is to use custom CSS to simply hide the warning. This can be done either in the browser or through a custom theme inside Syncthing.

Otherwise, the only other way is to literally rip the code out and compile your own build of Syncthing (which I’ve been doing myself for quite a long time). Security is important but root access is basically required on Android to make full-fledged synchronisation possible (e.g. being able to modify mtime, etc.).

You think, I think. The same framework can actually limit root drop capabilities, agreed? So the uid of the process is at best a broad assumption. We are all very confident in that we are right. People can be opinionated. Tools should be tools. Do you agree?

Can we just have a command line option to disable the warning which I think would be as simple as injecting a “root warning acknowledged” in the xml config at first start?

The use of STGUIASSETS envvar to point to a different gui root and just removing the warning from the template would seem the easiest option.

You can deactivate the warning with ublock origin, in “My filters” you add:

Your_IP##div.col-md-12:has-text(/consider/)

Best regards

This has a bit of a “stick a sticker on the check engine light” feel to it.

I got the message for Syncthing installed as root on a LXC Debian container on Proxmox. It seems that in this configuration, not putting the user “root” would have other complex consequences.

But if you have a reasonable solution for this context, I’m willing to hear it.

I understand the motivation of the developers regarding this message, but I also understand the users who want to take on this responsibility like big boys once and for all.

So in this circus if some can put their heads in the sand, others can stick a sticker.

LXC sits in between QEMU virtual machine and a lightweight container system such as Docker.

Running Syncthing as a non-root user in a LXC container is very uneventful. Auto-starting with systemd, configuring permissions, etc. are all the same as if running in a QEMU VM or bare-metal, so no worries about potential complex consequences.

About the only thing that requires a little bit of extra effort is NFS mounts with LXC, but pointing Syncthing at a network file share isn’t ideal either, so it shouldn’t be a deal breaker.

Thanks gadget, but I still don’t see the reason to add an additional user.

In my context this is an Unprivileged LXC Containers, in which I have an “Untrusted (Encrypted) Device” so the container is already isolated, the encrypted content unusable even after breach, and there is still a message telling me that it is dangerous to be a root user.

Don’t you think this thing is becoming religious? The same people will tell me to put an armored door for the shed in the garden (in which I go to poop).

Anyway, I moved from synctraysor to SyncthingTray and it allows me to connect to different instances directly (great) which means that I almost don’t have to no more visiting the GUI for controls. Even if this one is really well done!

Thank you to the developers and contributors, I remain attentive to your objections.