Fix Bluetooth permission error with AmbientCapabilities and enhanced postinst
- Add AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN to systemd service files - Add sensorpajen user to bluetooth group in postinst - Improve setcap error handling in postinst with clearer messaging - Add comprehensive troubleshooting section for Bluetooth permission errors This fixes the 'Operation not permitted' error when the service tries to access Bluetooth hardware. The fix uses two layers of protection: 1. systemd AmbientCapabilities (modern, robust) 2. File capabilities via setcap (traditional, wider compatibility)
This commit is contained in:
3
debian/sensorpajen.service
vendored
3
debian/sensorpajen.service
vendored
@@ -14,7 +14,8 @@ ExecStart=/opt/sensorpajen/venv/bin/python -m sensorpajen.main
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
# Bluetooth capabilities require this to be false
|
||||
# Bluetooth capabilities
|
||||
AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN
|
||||
NoNewPrivileges=false
|
||||
|
||||
# Logging
|
||||
|
||||
Reference in New Issue
Block a user