Syncthing running in Docker compose: Mapping error

  • forum.openmediavault.org/wsc/index.php?attachment/41277/I followed the instructions from here: https://wiki.omv-extras.org/doku.php?id=omv7:docker_in_omv to set SYNCTHING up in Docker Compose. SYNCTHINg within Docker is starting up as expected.

    I can also add a device [phone] to the server [status=connected]. However, when I try to synchronize the phone to the SYNCTHING server I am getting an error:


    Code
    2025-09-03 15:02:33: Failed to create folder marker (folder.label=mash_SamsungS10/DCIM folder.id=jha6c-ncqpw folder.type=sendreceive error="mkdir /run/s6-rc:s6-rc-init:JPHjCl/servicedirs/svc-syncthing/.stfolder: permission denied" log.pkg=model)
    
    
    2025-09-03 15:02:33: Failed initial scan (error="folder marker missing (this indicates potential data loss, search docs/forum to get information about how to proceed)" folder.label=mash_SamsungS10/DCIM folder.id=jha6c-ncqpw folder.type=sendreceive log.pkg=model)

    After hours of trying every option I can think of I am confuddled.


    Here my docker files:


    User 'appuser' exists and has r/w access to shared folder 'appdata' and 'sync' [as defined in the YAML config files.


    What FOLDER PATH do I have to add to the SYNCTHING when trying to add a folder from the phone [see attachment]?

    Any ideas/pointers highly appreciated.

  • JustMe

    Added the Label OMV 7.x
    • Official Post

    - ${PATH_TO_SYNCDATA}/mash/SAMSUNG/DCIM:/sync # SAMSUNG phone mash - Folder DCIM

    The path you should use in the Folder Path box of the Syncthing GUI is the one you configured in the container. In this case, /sync

  • Thanks for the reply, that was my original config based on my understanding of docker and its configuration.

    Could there be some lingering/remaining issues from prior attempts with a wrong FOLDER PATH [path based on filesystem (/srv/dev-disk-by-uuid-84aa9dee-1a67-4f44-b67d-a3ac9546f438/sync)]?

  • Well, spent a few hours on the problem... thought I made some progress but the mess became just a little bigger:


    On filesystem level, the OMV shared folder belonged to root:????. Changed that to appuser:users. Restarted the container . If I remember correctly it created the folder underneath but with the wrong owner:user. I changed the permissions to appuser:users for this folder and syncgthing was able to perform a sync [yeah]. All files belong to appuser:users as expected.


    Restarting the container however, results in an error message in SYNCTHING:

    Code
    2025-09-07 17:01:20: Failed initial scan (error="folder marker missing (this indicates potential data loss, search docs/forum to get information about how to proceed)" folder.label=mash_SamsungS10/DCIM folder.id=jha6c-ncqpw folder.type=sendreceive log.pkg=model)              

    Any ideas how to proceed?


    Thanks

    • Official Post

    So, indeed, it was a permissions problem. I suggest you read these two documents:

    omv7:docker_in_omv [omv-extras.org]

    omv7:nas_permissions_omv7 [omv-extras.org]


    The resetperms plugin can also be useful. Use it with caution; it can be dangerous if you modify Docker configuration files:

    omv7:omv7_plugins:resetperms [omv-extras.org]

Participate now!

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