I installed Syncthing on CentOS 7.7, it is run in shell narmaly, but run as daemon with tomcat user failed. the journal say “Error opening database: open /usr/tomcat/.config/syncthing/index-v0.14.0.db/LOCK: read-only file system”
I check the fcontext is “system_u:object_r:temp_t1”
thanks very much!
/etc/systemd/system/syncthing@tomcat.service
[Unit]
Description=Syncthing - Open Source Continuous File Synchronization for %I
Document=man:syncthing(1)
After=network.target
StartLimitIntervalSec=60
StartLimitBurst=4
I modify the service configuration as
ProtectSystem=strict ReadWritePaths=/usr/tomcat/.config/syncthing PrivateTmp=true SystemCallArchitectures=native MemoryDenyWriteExecute=true NoNewPrivileges=true