Add error handling for chmod operations in database initialization and remove restrictive systemd security settings
- Add try-except blocks around os.chmod calls in init_db to ignore OSError exceptions - Add comments noting permission errors are ignored for read-only filesystems in containers - Wrap chmod for database file, WAL-shm, and WAL-wal files with error handling - Remove StartLimitBurst and StartLimitIntervalSec from agent-coordinator systemd service - Remove ProtectSystem, ProtectHome, and ReadWritePaths security
This commit is contained in:
@@ -21,8 +21,6 @@ TimeoutStopSec=10
|
||||
# Production reliability
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StartLimitBurst=5
|
||||
StartLimitIntervalSec=60
|
||||
|
||||
# Production logging
|
||||
StandardOutput=journal
|
||||
@@ -31,9 +29,6 @@ SyslogIdentifier=aitbc-agent-coordinator
|
||||
|
||||
# Production security
|
||||
NoNewPrivileges=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/var/lib/aitbc/data/agent-coordinator /var/log/aitbc/agent-coordinator
|
||||
|
||||
# Production performance
|
||||
LimitNOFILE=65536
|
||||
|
||||
Reference in New Issue
Block a user