systemd: Configure security options

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2019-12-23 17:52:27 +05:30
parent 1f8a7183d4
commit c9b2bf0ad8
No known key found for this signature in database
GPG Key ID: C2E74282C2133D62
4 changed files with 8 additions and 2 deletions

View File

@ -12,6 +12,10 @@ User=caddy
Group=caddy
ExecStart=/usr/local/bin/daas
Restart=always
PrivateTmp=true
PrivateDevices=true
ProtectHome=true
ProtectSystem=full
[Install]
WantedBy=multi-user.target

View File

@ -15,6 +15,10 @@ WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
PrivateTmp=true
PrivateDevices=true
ProtectSystem=full
ReadWriteDirectories=/var/lib/gitea
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE

View File

@ -15,7 +15,6 @@ KillSignal=SIGQUIT
TimeoutStopSec=5s
PrivateTmp=true
PrivateDevices=true
ProtectSystem=full
[Install]
WantedBy=multi-user.target

View File

@ -15,7 +15,6 @@ KillSignal=SIGQUIT
TimeoutStopSec=5s
PrivateTmp=true
PrivateDevices=true
ProtectSystem=full
[Install]
WantedBy=multi-user.target