more permissions in mox.service to ease with upgrade to v0.0.2

- CAP_FSETID looks needed to make accessing setgid dirs work.
- CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH are needed to access the existing config/mox.conf.
- CAP_FOWNER seems needed to chmod the config/ and data/ files.
- RestrictSUIDSGID=yes has to be off for chmod to work
This commit is contained in:
Mechiel Lukkien 2023-02-27 15:48:37 +01:00
parent cfa6554d03
commit aed8360002
No known key found for this signature in database

View file

@ -22,11 +22,10 @@ ReadWritePaths=/home/mox/config /home/mox/data
ProtectKernelTunables=yes
ProtectControlGroups=yes
AmbientCapabilities=
CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE CAP_CHOWN CAP_FSETID
CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE CAP_CHOWN CAP_FSETID CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH CAP_FOWNER
NoNewPrivileges=yes
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK
ProtectProc=invisible
RestrictSUIDSGID=yes
RestrictNamespaces=yes
RestrictRealtime=yes
RemoveIPC=yes
@ -40,6 +39,9 @@ DevicePolicy=closed
SystemCallArchitectures=native
SystemCallFilter=@system-service
# Cannot have RestrictSUIDSGID with setgid directories.
#RestrictSUIDSGID=yes
# prevents CAP_NET_BIND_SERVICE from working?
#PrivateUsers=yes