How to add existing directory to Syncthing on ubuntu?

Hi, i’m running ST in docker. With binding like: /root/syncthing/st-sync:var/syncthing

I created folder on machine ~/syncthing/st-sync/testCreated When i try to add pre-existing directory in GUI(~/testCreated) i got error: folder marker missing (this indicates potential data loss...

Also permission error: Failed to create folder marker: mkdir /var/syncthing/testCreated/.stfolder: permission denied

What user needs to have access to pre-created folder?

It is working fine if i create an unexisting folder first in synching GUI, and only then create this exact dir in system.

Is there a way to make it work “natural way”? When i add already existing directories with files

The only problem is really the permission one.

I think that the following should give you the information needed to decide on how to fix the permissions.

Note that Syncthing runs as UID 1000 and GID 1000 by default. These may be altered with the PUID and PGID environment variables.

1 Like

Thanks, it is helped. I gave ownership of directory to user specified in PUID

1 Like

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