Summary
preferences-service: hostname update now falls back fromhostnamectl→hostname→ silent skip whenSYS_ADMINis missing; timezone update falls back fromtimedatectl→ file write → silent skip onEACCES;/etc/hostswrite silently skipped onEACCES(root-owned in containers)security-service: UFW unavailable returnsnull(defaults tofirewallEnabled: false) instead of throwing;systemctlunavailable returnsfalsefor Fail2Ban instead of throwing- All paths verified with unit tests and a live Docker container running as non-root without
SYS_ADMIN
Test plan
-
npx vitest run lib/server/modules/system/__tests__/preferences-service.test.ts— 6/6 pass (includes new test for EACCES on timezone file usingchmod 444) -
npx vitest run lib/server/modules/system/__tests__/security-service.test.ts— 6/6 pass -
npm run lint— 0 errors - Docker integration:
docker compose up, register, login,PUT /api/v1/system/preferenceswithhostname+timezone→ returns200instead of previous500 EACCES
🤖 Generated with Claude Code