Failed to create folder, permission denied

Hello everyone

When I tried adding a new folder for syncing I got this error:

2025-12-04 14:45:56: Failed to create folder marker: mkdir /var/task/.stfolder: permission denied

2025-12-04 14:45:56: Error on folder "task" (ewsq4-xdxms): folder marker missing (this indicates potential data loss, search docs/forum to get information about how to proceed)

I’m running syncthing in a Podman pod along other containers. This is usually a harmless setup except it doesn’t allow me to set UserNS while creating the container.
I think this must be the source of problem considering syncthing’s namespace can not be the same as the host user.

It’s interesting I already have a working folder but since I set that up some time ago I can’t remember what I’ve done back then :sweat_smile:
So any ideas?

Ok I don’t like this idea, but changing /var/task/ permissions to give everyone read, write and execute solves the error and files are syncing with no problem…

though this still seems different than what i’ve done for the previous folder :confused:

The user that owns the Syncthing process needs to be able to write the folder marker (and any files that get synced). So there’s a more granular fix available for the file rights.

right, changing the owner and group of a directory to the same UID and GID as the user running the container (1000 in this case) also appears to be a workaround

Respectfully, that’s not a workaround. That’s what Syncthing needs to write files.

3 Likes

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