PUID and PGID set are not being honored
This-will-be-your-username opened this issue · 2 comments
This-will-be-your-username commented
Expected Behavior
Docker configuration honors the PUID and PGID set in docker-compose.
Current Behavior
New files that are downloaded have the owning user and group as 911
. Reading online this is apparently because the PUID and PGID aren't set. However, they are set for the container.
Steps to Reproduce
- Copy docker compose YAML and paste into config
- Create new user account
sudo useradd -r -s /bin/false username
- Modify user's primary group
sudo usermod -g group username
- Grab user ID and group ID, put into docker compose.
- Activate environment
sudo docker-compose up -d
- Change SAB settings in UI to point complete and incomplete downloads to configured folders.
- Download something
Environment
OS: Ubuntu 20.04.3 LTS
CPU architecture: x86_64
How docker service was installed:
docker repo
Command used to create docker container (run/create/compose/screenshot)
sabnzbd:
image: lscr.io/linuxserver/sabnzbd
container_name: sabnzbd
environment:
- PUID:991
- PGID:1001
- TZ=Country/City [redacted]
volumes:
- /path/docker/config/sabnzbd:/config
- /path/downloads:/downloads
- /path/downloads/incomplete:/incomplete-downloads
ports:
- 8082:8080
restart: unless-stopped
Docker logs
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 01-migrations: executing...
[migrations] started
[migrations] no migrations found
[cont-init.d] 01-migrations: exited 0.
[cont-init.d] 02-tamper-check: executing...
[cont-init.d] 02-tamper-check: exited 0.
[cont-init.d] 10-adduser: executing...
usermod: no changes
-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/
Brought to you by linuxserver.io
-------------------------------------
To support the app dev(s) visit:
SABnzbd: https://sabnzbd.org/donate
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid: 911
User gid: 911
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2022-02-26 22:26:40,502::INFO::[SABnzbd:1166] --------------------------------
2022-02-26 22:26:40,502::INFO::[SABnzbd:1167] SABnzbd.py-3.5.0
2022-02-26 22:26:40,502::INFO::[SABnzbd:1177] Commit = a756eea25aa2ba879962a2de78d9f4fbdf30723a
2022-02-26 22:26:40,502::INFO::[SABnzbd:1179] Full executable path = /app/sabnzbd/SABnzbd.py
2022-02-26 22:26:40,502::INFO::[SABnzbd:1180] Arguments = "/app/sabnzbd/SABnzbd.py" "--config-file" "/config" "--server" "::"
2022-02-26 22:26:40,503::INFO::[SABnzbd:1181] Python-version = 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0]
2022-02-26 22:26:40,503::INFO::[SABnzbd:1182] Dockerized = True
2022-02-26 22:26:40,503::INFO::[SABnzbd:1183] CPU architecture = x86_64
2022-02-26 22:26:40,510::INFO::[SABnzbd:1186] Platform = posix - Linux-5.13.0-28-generic-x86_64-with-glibc2.29
2022-02-26 22:26:40,510::INFO::[SABnzbd:1192] Preferred encoding = UTF-8
2022-02-26 22:26:40,510::INFO::[SABnzbd:1211] SSL version = OpenSSL 1.1.1f 31 Mar 2020
2022-02-26 22:26:40,511::INFO::[SABnzbd:1220] Certifi version = 2021.10.08
2022-02-26 22:26:40,511::INFO::[SABnzbd:1221] Loaded additional certificates from /usr/local/lib/python3.8/dist-packages/certifi/cacert.pem
2022-02-26 22:26:40,511::INFO::[SABnzbd:1241] Using INI file /config/sabnzbd.ini
2022-02-26 22:26:40,512::INFO::[postproc:133] Loading postproc queue
2022-02-26 22:26:40,513::INFO::[scheduler:188] Scheduling RSS interval task every 60 min (delay=18)
2022-02-26 22:26:40,513::INFO::[scheduler:199] Scheduling VersionCheck on day 5 at 4:1
2022-02-26 22:26:40,513::INFO::[scheduler:213] Setting schedule for midnight BPS reset
2022-02-26 22:26:40,513::INFO::[scheduler:216] Setting schedule for server expiration check
2022-02-26 22:26:40,513::INFO::[scheduler:221] Setting scheduler for server quota check
2022-02-26 22:26:40,514::INFO::[__init__:321] All processes started
2022-02-26 22:26:40,514::INFO::[SABnzbd:336] Template location for Glitter is /app/sabnzbd/interfaces/Glitter
2022-02-26 22:26:40,514::INFO::[SABnzbd:336] Template location for Config is /app/sabnzbd/interfaces/Config
2022-02-26 22:26:40,514::INFO::[misc:1161] [N/A] Running external command: ['/usr/bin/unrar']
2022-02-26 22:26:40,518::INFO::[misc:1161] [N/A] Running external command: ['/usr/bin/7za']
2022-02-26 22:26:40,521::INFO::[misc:1161] [N/A] Running external command: ['/usr/bin/par2', '-h']
2022-02-26 22:26:40,524::INFO::[SABnzbd:423] SABYenc module (v4.0.2)... found!
2022-02-26 22:26:40,524::INFO::[SABnzbd:442] Cryptography module (v36.0.1)... found!
2022-02-26 22:26:40,524::INFO::[SABnzbd:447] par2 binary... found (/usr/bin/par2)
2022-02-26 22:26:40,525::INFO::[SABnzbd:454] UNRAR binary... found (/usr/bin/unrar)
2022-02-26 22:26:40,525::INFO::[SABnzbd:462] UNRAR binary version 6.00
2022-02-26 22:26:40,525::INFO::[SABnzbd:470] 7za binary... found (/usr/bin/7za)
2022-02-26 22:26:40,525::INFO::[SABnzbd:472] 7za binary version 16.02
2022-02-26 22:26:40,525::INFO::[SABnzbd:483] nice binary... found (/usr/bin/nice)
2022-02-26 22:26:40,525::INFO::[SABnzbd:487] ionice binary... found (/usr/bin/ionice)
2022-02-26 22:26:40,526::INFO::[SABnzbd:1430] Starting web-interface on :::8080
2022-02-26 22:26:40,526::INFO::[_cplogging:213] [26/Feb/2022:22:26:40] ENGINE Bus STARTING
/usr/local/lib/python3.8/dist-packages/cherrypy/process/servers.py:416: UserWarning: Unable to verify that the server is bound on 8080
warnings.warn(msg)
2022-02-26 22:26:45,645::INFO::[_cplogging:213] [26/Feb/2022:22:26:45] ENGINE Serving on http://:::8080
2022-02-26 22:26:45,646::INFO::[_cplogging:213] [26/Feb/2022:22:26:45] ENGINE Bus STARTED
2022-02-26 22:26:45,646::INFO::[SABnzbd:1469] Starting SABnzbd.py-3.5.0
2022-02-26 22:26:45,650::INFO::[dirscanner:117] Dirscanner starting up
2022-02-26 22:26:45,651::INFO::[panic:239] Launching browser with http://127.0.0.1:8080/sabnzbd
2022-02-26 22:26:45,651::INFO::[postproc:231] Completed Download Folder /config/Downloads/complete is not on FAT
2022-02-26 22:26:45,652::INFO::[notifier:123] Sending notification: SABnzbd - SABnzbd 3.5.0 started (type=startup, job_cat=None)
2022-02-26 22:26:45,725::INFO::[notifier:123] Sending notification: Update Available! - SABnzbd 3.5.1 (type=other, job_cat=None)
2022-02-26 22:26:45,726::INFO::[zconfig:61] No bonjour/zeroconf support installed
2022-02-26 22:26:45,726::INFO::[ssdp:108] Serving SSDP on 172.20.0.5 as SABnzbd
2022-02-26 22:27:16,839::INFO::[config:910] Writing settings to INI file /config/sabnzbd.ini
github-actions commented
This-will-be-your-username commented
YAML syntax was off. Found the error and its working correctly.