Failed to create folder root directory mkdir (docker image)

Hi,

When I run:

docker run -p 8384:8384 -p 22000:22000 \
    -v /mnt/syncthing:/var/syncthing \
    syncthing/syncthing:latest

and access the dashboard, the system is complaining:

2019-12-21 16:01:11: Failed to create folder root directory mkdir /Sync: permission denied

2019-12-21 16:01:11: Error on folder "Default Folder" (default): folder path missing

which is painful.

I feel the main Sync directory should be created during in the entrypoint (if not existing). In the container, I would expect the path to be /var/syncthing/config/Sync

I’m I missing something? Right now, I use https://github.com/linuxserver/docker-syncthing, but I don’t see a reason why the official docker app should not run out-of-the-box.

logs

2019-12-21 21:01:08 My ID: KOU4KZL-MXS3HL5-63BQKCL-LAZHB3D-ZNLIWXL-DCRE3GW-F55VK2P-W2YPFAZ
2019-12-21 21:01:09 Single thread SHA256 performance is 93 MB/s using crypto/sha256 (91 MB/s using minio/sha256-simd).
2019-12-21 21:01:11 Hashing performance is 78.55 MB/s
2019-12-21 21:01:11 Failed to create folder root directory mkdir /Sync: permission denied
2019-12-21 21:01:11 Ready to synchronize "Default Folder" (default) (sendreceive)
2019-12-21 21:01:11 Overall send rate is unlimited, receive rate is unlimited
2019-12-21 21:01:11 Error on folder "Default Folder" (default): folder path missing
2019-12-21 21:01:11 Failed initial scan of sendreceive folder "Default Folder" (default)
2019-12-21 21:01:11 QUIC listener ([::]:22000) starting
2019-12-21 21:01:11 TCP listener ([::]:22000) starting
2019-12-21 21:01:11 ...
2019-12-21 21:01:11 Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
2019-12-21 21:01:11 Using discovery server https://discovery.syncthing.net/v2/?noannounce&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
2019-12-21 21:01:11 Using discovery server https://discovery-v4.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
2019-12-21 21:01:11 Using discovery server https://discovery-v6.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
2019-12-21 21:01:11 GUI and API listening on [::]:8384
2019-12-21 21:01:11 Access the GUI via the following URL: http://127.0.0.1:8384/
2019-12-21 21:01:11 My name is "syncthing-node3"
2019-12-21 21:01:22 Detected 0 NAT services
2019-12-21 21:01:30 quic://0.0.0.0:22000 detected NAT type: Port restricted NAT
2019-12-21 21:01:30 quic://0.0.0.0:22000 resolved external address quic://157.245.4.54:22000 (via stun.syncthing.net:3478)
2019-12-21 21:01:40 Joined relay relay://128.173.88.78:22067

Thank you Pascal

I can’t rename the title of this thread :-/

Should be: Failed to create folder root directory mkdir (docker image)

This looks like a bug in the image to me, I would also expect the default folder to end up under /var/syncthing.

Invoked my magic powers.

2 Likes

My mystic essence has reborn.

I see the PR was merged. Thanks!!

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