I’m trying to set up Win ↔ Linux sync, and stumbled upon a concrete roadblock.
If I set a location outside a home folder on Linux, e.g. /share/sync (where /share is a dedicated btrfs partition), the sync does not happen, even though the Syncthing page says everything is up to date and shows the total file size correctly. The Linux folder just stays empty.
If I leave the default location, or use any folder in home, (~/Sync), the sync works as expected.
No matter how many times I tried to re-share the folder from both sides, the result is the same. I also tried to use symlinks, only to learn the hard way that they are not supported.
Could not find anything of relevance in the logs yet.
Any suggestions?
System info:
Syncthing v1.28.1
Linux Manjaro 24.1 with btrfs
Kernel version 6.11.10
Please use ps -ef | grep sync to confirm what user owns the Syncthing process. Then you can use su to become that user and confirm read and write access to that directory.
Typically if files are supposedly synced but not visible, it’s because your running in a Docker container and haven’t mapped the volumes properly. Is that the case?
The ps command shows that the process is running under correct user (me). However, I see two Syncthing processes running. Is this normal? Could it be because I am using Syncthing Tray as a GUI client (both on Windows and Linux)?
Super weird. Anything in the log? If not turn on the following debugs (I recommend one at a time) fs, sync, while inducing the behavior, and see if anything lets us know what the problem is.
I’ve enabled the debug logging, but it is not clear what kind of messages I should look for, as there seems to be no distinction between info messages, warnings, and errors.
The first thing I see is that /workspace/Work is owned by root:root while Syncthing is running under user andy.
Your solution changing the directory permissions to read/write for everyone would work, but is way overkill unless there are other users in addition to andy who will be reading/writing to that same directory – but if that’s the case, you’re going to end up with quite a messy pile of permissions to eventually deal with. Much better to take a more granular approach by changing the ownership instead:
chown -R andy: /workspace/Work
However, I don’t think that’s the core permissions issue…
It’s very unusual that your Syncthing binary is installed in /app/bin. Most often it’s /usr/bin/, possibly /usr/local/bin, or even ~/.local/bin.
Manjaro is based on Arch Linux, which means it’s using Pacman as the package manager, so a pacman -Syu syncthing would have dropped the binary into /usr/bin.
I downloaded the latest ISO from https://manjaro.org/ to take a closer look. I’m vary familiar with Arch Linux that Manjaro is based on, but other than being aware of Manjaro, hadn’t used it before.
Manjaro’s official Syncthing package installs to /usr/bin just like Arch Linux, Debian, Ubuntu, Fedora and other Linux distros not using containers or an immutable root filesystem, so it appears that you’ve got a custom Manjaro setup because the directory /app didn’t exist in my test installation.
You’ll need to review Syncthing’s logs and perhaps post screenshots of Syncthing’s UI, because with global read/write permissions on /workspace/Work there’s no reason Syncthing can’t use it unless there’s something external blocking Syncthing.
I installed Manjaro using the official iso file, with no modifications. Then I installed some non-system software, including Syncthing.
Today I re-installed Syncthing and Syncthing Tray, and set it to auto-start as a systemd user service, as described in the official docs. That seems to have fixed the issue.