mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-22 15:40:23 +00:00
9b6b9cca3d
We can tighten security by adding the following to the systemd service file: * NoNewPrivileges: should never be needed * DevicePolicy: only basics required * PrivateDevices: only needs mounted stuff, never devs * ProtectSystem: no need to change boot * RestrictAddressFamilies: INET, UNIX only Signed-off-by: Marc <mail@lpcvoid.com>
27 lines
560 B
Desktop File
27 lines
560 B
Desktop File
[Unit]
|
|
Description=SFTPGo Server
|
|
After=network.target
|
|
|
|
[Service]
|
|
User=sftpgo
|
|
Group=sftpgo
|
|
Type=simple
|
|
WorkingDirectory=/etc/sftpgo
|
|
Environment=SFTPGO_CONFIG_DIR=/etc/sftpgo/
|
|
Environment=SFTPGO_LOG_FILE_PATH=
|
|
EnvironmentFile=-/etc/sftpgo/sftpgo.env
|
|
ExecStart=/usr/bin/sftpgo serve
|
|
ExecReload=/bin/kill -s HUP $MAINPID
|
|
LimitNOFILE=8192
|
|
KillMode=mixed
|
|
PrivateTmp=true
|
|
Restart=always
|
|
RestartSec=10s
|
|
NoNewPrivileges=yes
|
|
PrivateDevices=yes
|
|
DevicePolicy=closed
|
|
ProtectSystem=true
|
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|