linuxserver / docker-qbittorrent

GNU General Public License v3.0
1.05k stars 155 forks source link

[BUG] UMASK variable is being ignored again #353

Open lynndixon opened 4 days ago

lynndixon commented 4 days ago

Is there an existing issue for this?

Current Behavior

It seems we may have a regression? I am attempting to adjust the UMASK for the running container. I have tried several iterations in my docker compose file, and am currently attempting to do - UMASK=000 to test with

When the container launches, I go into the shell and the output of running the umask command is still 022

Expected Behavior

I'd expect that setting the UMASk=003 or UMASK=000 be applied once the container is running.

Steps To Reproduce

  1. Create a docker compose
  2. Include the environment variable of UMASK=000
  3. start container
  4. open a shell into the container and run umask and see umask is still set to 022
  5. create some files by grabbing a torrent and notice the permissions it creates.

Environment

- OS: Debian
- How docker service was installed:

CPU architecture

x86-64

Docker creation

services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    environment:
      - PUID=568
      - PGID=568
      - TZ=America/New_York
      - WEBUI_PORT=8081
      - TORRENTING_PORT=30187
      - UMASK=000
    volumes:
      - /mnt/nvme/apps/qbittorrent:/config
      - /mnt/data/media/torrents:/downloads #optional
      - /mnt/data/media/torrents:/Media/torrents
      - /mnt/data/restricted/seeds:/seeds
    ports:
      - 8081:8080
      - 30187:30187
      - 30187:30187/udp
    deploy:
      resources:
        limits:
          memory: 12288M
          cpus: "8"
    restart: unless-stopped

Container logs

2024-11-18 04:36:56.148665+00:00[migrations] started
2024-11-18 04:36:56.148741+00:00[migrations] no migrations found
2024-11-18 04:36:56.216418+00:00───────────────────────────────────────
2024-11-18 04:36:56.216466+00:002024-11-18T04:36:56.216466449Z
2024-11-18 04:36:56.216477+00:00██╗     ███████╗██╗ ██████╗
2024-11-18 04:36:56.216496+00:00██║     ██╔════╝██║██╔═══██╗
2024-11-18 04:36:56.216507+00:00██║     ███████╗██║██║   ██║
2024-11-18 04:36:56.216516+00:00██║     ╚════██║██║██║   ██║
2024-11-18 04:36:56.216530+00:00███████╗███████║██║╚██████╔╝
2024-11-18 04:36:56.216539+00:00╚══════╝╚══════╝╚═╝ ╚═════╝
2024-11-18 04:36:56.216548+00:002024-11-18T04:36:56.216548903Z
2024-11-18 04:36:56.216558+00:00Brought to you by linuxserver.io
2024-11-18 04:36:56.216566+00:00───────────────────────────────────────
2024-11-18 04:36:56.216762+00:002024-11-18T04:36:56.216762792Z
2024-11-18 04:36:56.216796+00:00To support LSIO projects visit:
2024-11-18 04:36:56.216810+00:00https://www.linuxserver.io/donate/
2024-11-18 04:36:56.216822+00:002024-11-18T04:36:56.216822342Z
2024-11-18 04:36:56.216845+00:00───────────────────────────────────────
2024-11-18 04:36:56.216859+00:00GID/UID
2024-11-18 04:36:56.216870+00:00───────────────────────────────────────
2024-11-18 04:36:56.221489+00:002024-11-18T04:36:56.221489330Z
2024-11-18 04:36:56.221518+00:00User UID:    568
2024-11-18 04:36:56.221531+00:00User GID:    568
2024-11-18 04:36:56.221544+00:00───────────────────────────────────────
2024-11-18 04:36:56.223381+00:00Linuxserver.io version: 5.0.1-r0-ls364
2024-11-18 04:36:56.223567+00:00Build-date: 2024-11-17T06:55:31+00:00
2024-11-18 04:36:56.223592+00:00───────────────────────────────────────
2024-11-18 04:36:56.223605+00:002024-11-18T04:36:56.223605697Z
2024-11-18 04:36:56.309810+00:00[custom-init] No custom files found, skipping...
2024-11-18 04:36:56.553157+00:00WebUI will be started shortly after internal preparations. Please wait...
2024-11-18 04:36:58.801392+00:002024-11-18T04:36:58.801392329Z
2024-11-18 04:36:58.801483+00:00(process:165): GLib-CRITICAL **: 23:36:58.801: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
2024-11-18 04:37:00.128639+00:002024-11-18T04:37:00.128639115Z
2024-11-18 04:37:00.128683+00:00******** Information ********
2024-11-18 04:37:00.128715+00:00To control qBittorrent, access the WebUI at: http://localhost:8081
2024-11-18 04:37:00.358767+00:00Connection to localhost (::1) 8081 port [tcp/tproxy] succeeded!
2024-11-18 04:37:00.383246+00:00[ls.io-init] done.
2024-11-18 04:37:30.126996+00:002024-11-18T04:37:30.126996687Z
2024-11-18 04:37:30.127066+00:00(process:165): GLib-CRITICAL **: 23:37:30.126: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
2024-11-18 04:37:31.584514+00:002024-11-18T04:37:31.584514876Z
2024-11-18 04:37:31.584587+00:00(process:165): GLib-CRITICAL **: 23:37:31.584: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
2024-11-18 04:38:13.539721+00:002024-11-18T04:38:13.539721084Z
2024-11-18 04:38:13.539821+00:00(process:165): GLib-CRITICAL **: 23:38:13.539: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
2024-11-18 04:43:45.012169+00:002024-11-18T04:43:45.012169230Z
2024-11-18 04:43:45.012316+00:00(process:165): GLib-CRITICAL **: 23:43:45.010: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
2024-11-18 04:47:29.003483+00:002024-11-18T04:47:29.003483484Z
2024-11-18 04:47:29.003623+00:00(process:165): GLib-CRITICAL **: 23:47:29.003: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
github-actions[bot] commented 4 days ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

Roxedus commented 4 days ago

open a shell into the container and run umask and see umask is still set to 022

This is not a valid test, as variables are not passed to this shell by default. you can run /usr/bin/with-contenv bash to get a shell aware of container variables (qbit is started with this awareness)