File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
systemd/etc/systemd/system Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ pidfile="/var/run/${prog}.pid"
2626
2727start () {
2828 echo -n $" Starting $prog : "
29- " $ghfs " --config=/etc/ghfs.conf &
29+ setcap CAP_NET_BIND_SERVICE=+ep " $ghfs "
30+ runuser -u nobody -- " $ghfs " --config=/etc/ghfs.conf &
3031 retval=$?
3132 echo
3233 if [ $retval -eq 0 ]; then
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ After=network.target
44
55[Service]
66Type =simple
7- ExecStart =/usr/local/bin/ghfs --config =/etc/ghfs.conf
7+ ExecStartPre =setcap CAP_NET_BIND_SERVICE =+ep /usr/local/bin/ghfs
8+ ExecStart =runuser -u nobody -- /usr/local/bin/ghfs --config =/etc/ghfs.conf
89ExecReload =/bin/kill -s HUP $MAINPID
910KillSignal =SIGTERM
1011KillMode =process
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ After=network.target
44
55[Service]
66Type =simple
7- ExecStart =/usr/local/bin/ghfs --config =/etc/ghfs_%I.conf
7+ ExecStartPre =setcap CAP_NET_BIND_SERVICE =+ep
8+ ExecStart =runuser -u nobody -- /usr/local/bin/ghfs --config =/etc/ghfs_%I.conf
89ExecReload =/bin/kill -s HUP $MAINPID
910KillSignal =SIGTERM
1011KillMode =process
You can’t perform that action at this time.
0 commit comments