Docker syncthing volume mapping errors

  • In the "Compose Files" section of the compose plugin, should the "Owner" and "Group of directories and files" be left as root?


    I've been reconfiguring docker, clearing out old folders and settings on my OMV installation, and going through the OMV 7 Docker guide here, setting up as per section 2.2, pretty much starting from scratch because I had a disk failure.

    I've kept the appuser user I had previously set up, which I'm using in the compose files.

    I've made a syncthing container which is up and running, but I'm having some permissions issues with the sync folders. The folders it's creating seem to be owned by root with group root. Tbh I might just try changing the "Owner" and "Group" setting in the "Compose Files" section to "appuser" and see what happens.


    Watch this space...

    OMV version: 8.2.7-1 (Synchrony) Linux 6.12.74+deb13+1-amd64

    16GB / Pentium2.4GHz / 4x4TB SATA (btfrs array) / 1x250GB SATA SSD / 32GB USB Boot

    Plugins - backup 8.0.1 / borgbackup 8.1.7 / clamav 8.0-4 / compose 8.1.9 / cterm 8.0 / fail2ban 8.0 / filebrowser 8.0.3-1 / kvm 8.2.3 / locate 8.0 / md 8.0.4-1 / omvextrasorg 8.0.2 / sharerootfs 8.0-1 / symlinks 8.0.1 / writecache 8.1.7

    Edited once, last by Dougal ().

  • If you use the linuxserver/syncthing image as described in the guide (here), the files should be owned by appuser:users. If you get more problems not with file owner and group but with permissions for the group, then try adding UMASK to the environment variables in the compose files.

    Code
          - UMASK=002 #make files be 664, dirs be 775

    Think about upgrading to OMV8 as well.

  • Syncthing is still complaining about folder creation. I vaguely remember from the first time I set it up (back when OMV was using Portainer (it worked for me back then so I'm clearly forgetting something) that there was a step where appuser was given ownership of the data folder.


    Here's what syncthing is telling me when I try and add a folder to it.

    Quote

    2026-03-05 19:26:38: Failed to create folder marker (folder.id=53qoh-lqfau folder.type=sendreceive error="mkdir /data1/.stfolder: permission denied" log.pkg=model) 2026-03-05 19:26:38: Failed initial scan (error="folder marker missing (this indicates potential data loss, search docs/forum to get information about how to proceed)" folder.id=53qoh-lqfau folder.type=sendreceive log.pkg=model)



    If you use the linuxserver/syncthing image as described in the guide (here), the files should be owned by appuser:users. If you get more problems not with file owner and group but with permissions for the group, then try adding UMASK to the environment variables in the compose files.

    Code
          - UMASK=002 #make files be 664, dirs be 775

    Think about upgrading to OMV8 as well.

    I'll try the - UMASK=002 line

    I will definitely be upgrading to OMV 8 at some point.

    OMV version: 8.2.7-1 (Synchrony) Linux 6.12.74+deb13+1-amd64

    16GB / Pentium2.4GHz / 4x4TB SATA (btfrs array) / 1x250GB SATA SSD / 32GB USB Boot

    Plugins - backup 8.0.1 / borgbackup 8.1.7 / clamav 8.0-4 / compose 8.1.9 / cterm 8.0 / fail2ban 8.0 / filebrowser 8.0.3-1 / kvm 8.2.3 / locate 8.0 / md 8.0.4-1 / omvextrasorg 8.0.2 / sharerootfs 8.0-1 / symlinks 8.0.1 / writecache 8.1.7

  • Can you share you compose file and the ownership of the path that is translated to data1 in the compose file under volumes?

    In OMV I have a user "appuser" with UID 1002 and GID 100

    I have a shared folder in my RAID pool called "Data" with "appuser" having RW permissions


    /DATA is a symlink to /srv/dev-disk-by-uuid-35a47e11-1aa8-4377-95c9-152c61c299e8/Data which currently has the following attibutes when viewed in CLI:

    drwxrwsr-x+ 1 appuser users 128 Mar 5 20:30 Data


    Global Env looks like this:

    Code
    APPUSER_PUID=1002
    APPUSER_PGID=100
    TIME_ZONE_VALUE=Europe/London


    Compose looks like this:

    When I start the container with "Up" it seems go smoothly.

    Code
    export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LC_ALL=C.UTF-8; export LANGUAGE=; docker compose --file '/srv/dev-disk-by-uuid-fbcaa74e-31eb-4cb8-ada0-5731db9f01a4/dockerappdata/Syncthing/Syncthing.yml' --file "/srv/dev-disk-by-uuid-fbcaa74e-31eb-4cb8-ada0-5731db9f01a4/dockerappdata/Syncthing/compose.override.yml" --env-file '/srv/dev-disk-by-uuid-fbcaa74e-31eb-4cb8-ada0-5731db9f01a4/dockerappdata/global.env' --env-file '/srv/dev-disk-by-uuid-fbcaa74e-31eb-4cb8-ada0-5731db9f01a4/dockerappdata/Syncthing/Syncthing.env' up -d 2>&1
     Container syncthing Starting Container syncthing Started 
    END OF LINE


    The following folders are created:

    Under /srv/dev-disk-by-uuid-35a47e11-1aa8-4377-95c9-152c61c299e8/Data

    drwxr-sr-x+ 1 root root 40 Mar 5 21:52 documents

    Under /srv/dev-disk-by-uuid-35a47e11-1aa8-4377-95c9-152c61c299e8/Data/documents

    drwxr-sr-x+ 1 root root 0 Mar 5 21:52 sync_data1

    drwxr-sr-x+ 1 root root 0 Mar 5 21:52 sync_data2


    When I try and add /data1 to syncthing I get the following error:

    Quote

    2026-03-05 21:57:45: Failed to create folder marker (folder.id=dqzj9-qvkmo folder.type=sendreceive error="mkdir /data1/.stfolder: permission denied" log.pkg=model) 2026-03-05 21:57:45: Failed initial scan (error="folder marker missing (this indicates potential data loss, search docs/forum to get information about how to proceed)" folder.id=dqzj9-qvkmo folder.type=sendreceive log.pkg=model)

    OMV version: 8.2.7-1 (Synchrony) Linux 6.12.74+deb13+1-amd64

    16GB / Pentium2.4GHz / 4x4TB SATA (btfrs array) / 1x250GB SATA SSD / 32GB USB Boot

    Plugins - backup 8.0.1 / borgbackup 8.1.7 / clamav 8.0-4 / compose 8.1.9 / cterm 8.0 / fail2ban 8.0 / filebrowser 8.0.3-1 / kvm 8.2.3 / locate 8.0 / md 8.0.4-1 / omvextrasorg 8.0.2 / sharerootfs 8.0-1 / symlinks 8.0.1 / writecache 8.1.7

  • Did you try deleting all files and starting from scratch again after switching to appuser:users? In my setup (similar to yours without symlinks) the dir mapped to /data1 is owned by root:users with drwxrwsr-x+ and I don't get any problems in docker log.

  • Did you try deleting all files and starting from scratch again after switching to appuser:users? In my setup (similar to yours without symlinks) the dir mapped to /data1 is owned by root:users with drwxrwsr-x+ and I don't get any problems in docker log.

    I have deleted everything to do with syncthing in docker and tried to re-up the compose file. It's possible I've missed something though. As I no longer have any containers in use I might try deleting everything and uninstalling/installing the compose plugin and start from scratch.

    OMV version: 8.2.7-1 (Synchrony) Linux 6.12.74+deb13+1-amd64

    16GB / Pentium2.4GHz / 4x4TB SATA (btfrs array) / 1x250GB SATA SSD / 32GB USB Boot

    Plugins - backup 8.0.1 / borgbackup 8.1.7 / clamav 8.0-4 / compose 8.1.9 / cterm 8.0 / fail2ban 8.0 / filebrowser 8.0.3-1 / kvm 8.2.3 / locate 8.0 / md 8.0.4-1 / omvextrasorg 8.0.2 / sharerootfs 8.0-1 / symlinks 8.0.1 / writecache 8.1.7

  • Quite a lot of head scratching today. But I think I have fixed it with the resetperms plugin. Thanks for your assistance.

    OMV version: 8.2.7-1 (Synchrony) Linux 6.12.74+deb13+1-amd64

    16GB / Pentium2.4GHz / 4x4TB SATA (btfrs array) / 1x250GB SATA SSD / 32GB USB Boot

    Plugins - backup 8.0.1 / borgbackup 8.1.7 / clamav 8.0-4 / compose 8.1.9 / cterm 8.0 / fail2ban 8.0 / filebrowser 8.0.3-1 / kvm 8.2.3 / locate 8.0 / md 8.0.4-1 / omvextrasorg 8.0.2 / sharerootfs 8.0-1 / symlinks 8.0.1 / writecache 8.1.7

  • I spoke too soon. ||

    OMV version: 8.2.7-1 (Synchrony) Linux 6.12.74+deb13+1-amd64

    16GB / Pentium2.4GHz / 4x4TB SATA (btfrs array) / 1x250GB SATA SSD / 32GB USB Boot

    Plugins - backup 8.0.1 / borgbackup 8.1.7 / clamav 8.0-4 / compose 8.1.9 / cterm 8.0 / fail2ban 8.0 / filebrowser 8.0.3-1 / kvm 8.2.3 / locate 8.0 / md 8.0.4-1 / omvextrasorg 8.0.2 / sharerootfs 8.0-1 / symlinks 8.0.1 / writecache 8.1.7

  • Dougal

    Added the Label OMV 7.x
  • Dougal

    Changed the title of the thread from “Compose plugin settings question” to “Docker syncthing volume mapping errors”.
  • I'm not sure if I'm having a permissions problem or if the mapping isn't working properly. I think some realtime log analysis might help, but the OMV diagnostics logs are timing out on me.


    What logs should I be looking at to try and see what's actually happening when the syncthing container tries to write to a directory? I've found Dozzle for looking at the output of the container's logs.

    OMV version: 8.2.7-1 (Synchrony) Linux 6.12.74+deb13+1-amd64

    16GB / Pentium2.4GHz / 4x4TB SATA (btfrs array) / 1x250GB SATA SSD / 32GB USB Boot

    Plugins - backup 8.0.1 / borgbackup 8.1.7 / clamav 8.0-4 / compose 8.1.9 / cterm 8.0 / fail2ban 8.0 / filebrowser 8.0.3-1 / kvm 8.2.3 / locate 8.0 / md 8.0.4-1 / omvextrasorg 8.0.2 / sharerootfs 8.0-1 / symlinks 8.0.1 / writecache 8.1.7

  • Sorry. I got no idea. When I followed the tutorial step by step it worked fine. Did you change anything on the settings of the compose plugin? You can and should try to follow exactly the tutorial to see if that helps. Start without symlinks etc. Then compare your intended setup with that what's working - compare permissions etc.


    Here are my settings. They are using OMV8 style of variable replacement:

    "syncthing" shared folder permissions: owner:root, group:users - rwxrwxr-x (could probably change the owner to appuser or some other user on the nas as well)

  • I got it working but it required changing ownership of all the folders the syncthing container creates to appuser:users via the command line.

    I don't know if that's what I'm supposed to be doing but I'm going with it for now. :)

    OMV version: 8.2.7-1 (Synchrony) Linux 6.12.74+deb13+1-amd64

    16GB / Pentium2.4GHz / 4x4TB SATA (btfrs array) / 1x250GB SATA SSD / 32GB USB Boot

    Plugins - backup 8.0.1 / borgbackup 8.1.7 / clamav 8.0-4 / compose 8.1.9 / cterm 8.0 / fail2ban 8.0 / filebrowser 8.0.3-1 / kvm 8.2.3 / locate 8.0 / md 8.0.4-1 / omvextrasorg 8.0.2 / sharerootfs 8.0-1 / symlinks 8.0.1 / writecache 8.1.7

  • Under /srv/dev-disk-by-uuid-35a47e11-1aa8-4377-95c9-152c61c299e8/Data/documents

    drwxr-sr-x+ 1 root root 0 Mar 5 21:52 sync_data1

    drwxr-sr-x+ 1 root root 0 Mar 5 21:52 sync_data2

    Those "sync_data" dirs need to acessible by appuser. They are not. That's why I had them owned by root with group users while creating them in the UI. Either users group needs to be able to write to it or appuser directly.

    If no other user besides appuser needs to work with them, you can create the dir with appuser owner and dont care about the group. If you want other users on the NAS itself to be able to have access, you need to have the users group with write previleges and you need to set the UMASK environment variable.

    In short: What you did now is somewhat correct. Would have been easier to start directly with those dirs having owner appuser or the group users.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!