Add error handling for chmod operations in database initialization and remove restrictive systemd security settings
Some checks failed
Systemd Sync / sync-systemd (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled

- 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:
aitbc
2026-04-15 08:29:03 +02:00
parent a79057ce35
commit 9bb4791a97
2 changed files with 13 additions and 8 deletions

View File

@@ -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