Is there something special with sharing /etc?

I would like to share /etc as a send-only share. Syncthing is running as root.

I get the message

2022-11-27 15:41:21: Failed to create folder marker: mkdir /etc/.stfolder: read-only file system

2022-11-27 15:41:21: Error on folder "/etc" (33xty-7zqtz): folder marker missing (this indicates potential data loss, search docs/forum to get information about how to proceed)

Is there something specific that prevents /etc to be shared (built-in to Syncthing)?

This is a standard Debian machine, with other successful shares and I do not see a reason why Syncthing running as root could not create the expected directory:

root@router ~# file /etc/.stfolder
/etc/.stfolder: cannot open `/etc/.stfolder' (No such file or directory)
root@router ~# mkdir /etc/.testfile
root@router ~# file /etc/.testfile
/etc/.testfile: directory

Interestingly enough, I see on the machine I want to share /etc to the message

router wants to share folder "/etc" (33xty-7zqtz). Add new folder?

which means that somehow router sent a share advertisement (but sending the advertisement and actually sharing may be independent (though I think they should not be))

/etc is protected by the hardening options in the systemd unit file, you’ll have to loosen those up a bit.

1 Like

Thank you. I will investigate this (there are several settings in systemd that are relevant), in the meantime I manually created /etc/.stfolder and the synchronization started.

PSA: don’t edit the unit file manually.

systemctl edit --full is your friend and won’t go up in smoke on the next update.

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