mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-10 17:35:00 -06:00
Run qbt-nox as non-root
This is mainly to avoid downloaded files being owned by root which requires another one or two commands to change the file ownership.
This commit is contained in:
15
dist/docker/entrypoint.sh
vendored
15
dist/docker/entrypoint.sh
vendored
@@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
downloadsPath="/downloads"
|
||||
profilePath="/config"
|
||||
qbtConfigFile="$profilePath/qBittorrent/config/qBittorrent.conf"
|
||||
|
||||
@@ -22,7 +23,13 @@ EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
qbittorrent-nox \
|
||||
--profile="$profilePath" \
|
||||
--webui-port="$QBT_WEBUI_PORT" \
|
||||
"$@"
|
||||
# those are owned by root by default
|
||||
# don't change existing files owner in `$downloadsPath`
|
||||
chown qbtUser:qbtUser "$downloadsPath"
|
||||
chown qbtUser:qbtUser -R "$profilePath"
|
||||
|
||||
doas -u qbtUser \
|
||||
qbittorrent-nox \
|
||||
--profile="$profilePath" \
|
||||
--webui-port="$QBT_WEBUI_PORT" \
|
||||
"$@"
|
||||
|
||||
Reference in New Issue
Block a user