[SOLVED] No write permissions in Linux container

I’ve set up a new instance of syncthing inside an LXC container. When trying to add a folder to sync, syncthing complains about missing permissions:

 2019-09-05 13:43:02: Failed to create folder marker: stat /home/syncthing/Musik/.stfolder: permission denied
 2019-09-05 13:43:02: Error on folder "Musik" (n3bfn-6f3h5): stat /home/syncthing/Musik/.stfolder: permission denied
 2019-09-05 13:45:17: Loading ignores: open /home/syncthing/Musik/.stignore: permission denied
 2019-09-05 13:45:17: Failed to create folder marker: stat /home/syncthing/Musik/.stfolder: permission denied
 2019-09-05 13:45:17: Error on folder "Musik" (n3bfn-6f3h5): stat /home/syncthing/Musik/.stfolder: permission denied 

However, I don’t see why it shouldn’t have the requested permissions: The user syncthing runs as has write permissions to the directory in question.

syncthing@syncthing:~$ ps -Ouser 92
  PID USER     S TTY          TIME COMMAND
   92 syncthi+ S ?        00:00:34 /usr/bin/syncthing -no-browser -no-restart -logflags=0
syncthing@syncthing:~$ id
uid=105(syncthing) gid=65534(nogroup) groups=65534(nogroup)
syncthing@syncthing:~$ ls -l /home/syncthing/Musik/.sttest
ls: cannot access '/home/syncthing/Musik/.sttest': No such file or directory
syncthing@syncthing:~$ touch /home/syncthing/Musik/.sttest
syncthing@syncthing:~$ ls -l /home/syncthing/Musik/.sttest
-rw-r--r-- 1 syncthing nogroup 0 Sep  5 11:57 /home/syncthing/Musik/.sttest
syncthing@syncthing:~$ syncthing --version
syncthing v1.2.2 "Fermium Flea" (go1.12.9 linux-amd64) deb@build.syncthing.net 2019-08-15 13:51:09 UTC

Any ideas anybody?

It’s complaining specifically about the .stfolder directory. Does it have permissions on that, if it already exists? Volume mappings getting in the way? Security policy applied? Otherwise I don’t know, this is a permissions thing, double check those. :slight_smile:

Thanks for your help.

Turns out the problem was the “nogroup” gid. Changing that to a regular one solved the issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.