Access denied despite writable mountpoints

Hi all,
I’m using the latest Linuxserver Transmission image from Docker Hub. Looking at the official docker-compose.yml file I made sure that the volumes are mapped properly and are accessible and owned by the account specified in the PUID and PGID. I even ran docker exec to create and delete files from within the container. However, when I add files, it begins to download then stops and shows “Permission denied (/downloads/complete/” error.

Here’s my docker-compose file:

    image: linuxserver/transmission:latest
    restart: unless-stopped
    container_name: transmission
    hostname: transmission
      - "/mnt/usb:/downloads"
      - "/mnt/usb/watch:/watch"
      - "$PWD/transmission/config:/config"
      - "$PWD/transmission/log:/var/log"
      - mainnet
      - PUID=2021
      - PGID=2021
      - TZ=Europe/London

What is the file format of your USB disk? You need to use a Linux filesystem and not a Windows one of you want permissions to work correctly.

Thank you @saarg
It’s actually just a directory and not an actual USB drive. This is because I have another machine with Transmission installed where there is a USB drive. The RPi is booting up from an External SSD drive that is ext4.

I also tested writability by using docker exec to run bash and then “touch test.file” under /downloads , /downloads/complete and /downloads/incomplete

I also noticed that there is nothing under /downloads/incomplete or /downloads/complete so I don’t know where the temp files are being created.

You can’t exec into the container as root and test if you can write to the folders. The abc user is running the software inside the container, so the I’d you mapped in PUID & PGID needs the correct permissions on the host folder /mnt/usb.
What is the output of ls -al /mnt/

Here’s the output

drwxr-xr-x 4 root root 4096 Apr 3 11:33 .
drwxr-xr-x 19 root root 4096 Feb 27 00:04 …
drwxrwxrwx 2 root video 0 Mar 15 22:54 share
drw-rw-rw- 7 transmission transmission 4096 Apr 11 14:08 usb

This is the output of ls -lan /mnt

total 12
drwxr-xr-x 4 0 0 4096 Apr 3 11:33 .
drwxr-xr-x 19 0 0 4096 Feb 27 00:04 …
drwxrwxrwx 2 0 44 0 Mar 15 22:54 share
drw-rw-rw- 7 2021 2021 4096 Apr 11 14:08 usb

Please post the full logs of the container.
/mnt/usb is on the SSD?

Can you execute the below commands and post the output?
docker exec -it -u abc transmission bash
touch /downloads/test
ls -al /downloads

Thank you @saarg

Yes /mnt/usb is just a directory on the SSD the RPi is booting off.

I ran the command and got permission denied:

docker exec -it -u abc transmission bash
bash: /root/.bashrc: Permission denied
abc@transmission:/$ touch /downloads/test
touch: cannot touch ‘/downloads/test’: Permission denied

Is the abc account not impersonating 2021?

You didn’t post the container log.
Also try to set execute rights for the owner of the usb folder. As far as I remember it’s required.


docker logs transmission
[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] 10-adduser: executing...

          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/

Brought to you by

To support LSIO projects visit:

User uid:    2021
User gid:    2021

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2021-04-11 00:33:13.579] Transmission 3.00 (bb6b5a062e) started (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/session.c:769)
[2021-04-11 00:33:13.579] RPC Server Serving RPC and Web requests on (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/rpc-server.c:1243)
[2021-04-11 00:33:13.579] DHT Reusing old id (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/tr-dht.c:383)
[2021-04-11 00:33:13.579] DHT Bootstrapping from 97 IPv4 nodes (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/tr-dht.c:172)
[2021-04-11 00:33:13.579] Using settings from "/config" (/home/buildozer/aports/community/transmission/src/transmission-3.00/daemon/daemon.c:646)
[2021-04-11 00:33:13.579] Saved "/config/settings.json" (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/variant.c:1221)
[2021-04-11 00:33:13.579] Watching "/watch" for new .torrent files (/home/buildozer/aports/community/transmission/src/transmission-3.00/daemon/daemon.c:698)
[2021-04-11 00:33:13.579] Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/natpmp.c:73)
[2021-04-11 00:33:13.579] Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/natpmp.c:73)
[2021-04-11 00:33:21.578] Port Forwarding State changed from "Not forwarded" to "Starting" (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/port-forwarding.c:106)
[2021-04-11 00:33:21.578] Port Forwarding State changed from "Starting" to "???" (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/port-forwarding.c:106)
[2021-04-11 00:43:06.579] Saved "/config/torrents/8266ee3745bb162232b54c37198418e1867f4e64.torrent" (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/variant.c:1221)
[2021-04-11 00:43:06.579] 8266ee3745bb162232b54c37198418e1867f4e64 Queued for verification (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/verify.c:272)
[2021-04-11 00:43:06.579] 8266ee3745bb162232b54c37198418e1867f4e64 Verifying torrent (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/verify.c:220)
[2021-04-11 00:43:07.579] 8266ee3745bb162232b54c37198418e1867f4e64 Could not connect to tracker (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/announcer.c:1085)
[2021-04-11 00:43:07.579] 8266ee3745bb162232b54c37198418e1867f4e64 Retrying announce in 20 seconds. (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/announcer.c:1094)
[2021-04-11 00:43:07.579] Changed open file limit from 1048576 to 1024 (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/fdlimit.c:408)
[2021-04-11 00:43:11.580] Saved "/config/torrents/8266ee3745bb162232b54c37198418e1867f4e64.torrent" (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/variant.c:1221)
[2021-04-11 00:43:11.580] **Omitted** [1080p] [WEBRip] [5.1] [YTS.MX] Pausing (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/torrent.c:2022)
[2021-04-11 00:43:11.580] Saved "/config/resume/8266ee3745bb162232b54c37198418e1867f4e64.resume" (/home/buildozer/aports/community/transmission/src/transmission-3.00/libtransmission/variant.c:1221)

I think the execute rights did it. Just added it and I was able to use the docker execute to create a test file. Just restarting the container. Will report back.

Thank you so much @saarg . That did the trick. It’s now downloading. Thank you once again.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.