Docker-qBittorrent-Enhanced-Edition
Docker-qBittorrent-Enhanced-Edition copied to clipboard
PUID和PGID传入好像不起作用
docker-compose如下,指定PUID和PGID分别是1000和100,在启动容器时,下载文件夹会变成 drwxr-sr-x+ 25 911 1001 16384 Apr 8 17:41 qbittorrent-downloads
qbittorrent:
image: superng6/qbittorrentee
container_name: qbittorrentee
restart: unless-stopped
network_mode: host
logging:
options:
max-size: "1m"
environment:
- PUID=1000
- PGID=100
- TZ=${TZ}
同样问题复现 superng6/qbittorrentee:latest 603fa92ab00d
+1
umask同样不生效
umask同样不生效
+1, 顺便一提umask可以用UMASK_SET变量
多尝试下会发现,stop 之后直接 up,权限又会被正确设置 只有 down 后再 up,才会出现 911 我猜测是它结合 s6 overlay 或 linuxserver 逻辑有点问题,用户创建滞后了(而 stop 再 up 用户已经创建在容器里
但是目前的 linuxserver 最新原版是没问题的,最佳解决方案是重新移植一遍
直接的解决方案,把 root/etc/cont-init.d/30-config
里面的 chown 删了,手动改一次权限就好
比较奇怪的是同样被 chown 的 config
不会出现 911,这解释不通
多尝试下会发现,stop 之后直接 up,权限又会被正确设置 只有 down 后再 up,才会出现 911 我猜测是它结合 s6 overlay 或 linuxserver 逻辑有点问题,用户创建滞后了(而 stop 再 up 用户已经创建在容器里
但是目前的 linuxserver 最新原版是没问题的,最佳解决方案是重新移植一遍 直接的解决方案,把
root/etc/cont-init.d/30-config
里面的 chown 删了,手动改一次权限就好比较奇怪的是同样被 chown 的
config
不会出现 911,这解释不通
可能是老版本的 inuxserver base image 有问题,已经更新到最新版,可以尝试一下看看,目前我这边无法复现这个问题
还是一样的问题 zhang:zhang 即 1000:1000
environment:
- PUID=1000
- PGID=1000
volumes:
- ./config:/config
- ./downloads:/downloads
但我挂载的目录是软链接 downloads -> /mnt/WD-A1T/download/qBittorrentEE
正常应该drwxrwxr-x 1 zhang zhang 2.5K Sep 14 23:21 qBittorrentEE
第一次docker compose up
会变成drwxrwxr-x 1 911 zhang 2.5K Sep 14 23:21 qBittorrentEE
常规情况是怎么样就不知道了
我这边遇到的情况是不会改owner, 但是会改group为1001 根据楼上提示, down之后再up就正常了 新建就不正常
在 root/etc/s6-overlay/scripts/config-qbittorrentee
chown 和最终运行 qb 前,再跑一遍 PUID/PGID 的添加可能是更好的一个 workaround。
干脆自建了一个镜像, 在linuxserver的qbittorrent基础上直接替换了一下binary, 问题解决了...