EdyTheCow / docker-media-center

Docker Media Center running Jellyfin under Traefik, fully automated and production ready solution
111 stars 11 forks source link

Transmission Error Message When Downloading torrent #4

Closed MachineSaver closed 6 months ago

MachineSaver commented 1 year ago

Can you help me resolve transmission torrent client running from a docker compose file which looks like:

The error when attempting to download the torrent: Couldn't get '/data/downloads/complete/filename: Permission denied (13)

268374727-a2abdaa8-9da3-491f-80c0-cec7ff5150b8

docker-compose.yml

version: "3.7"

networks: global: external: true local: external: false

services:

jellyfin: image: lscr.io/linuxserver/jellyfin:latest restart: unless-stopped

security_opt: # Required for Docker versions below 20.10.10, update Docker for long term solution. Source: https://docs.linuxserver.io/faq#jammy

#  - seccomp=unconfined
networks:
  - global
  - local
environment:
  - PUID=${ENV_PUID}
  - PGID=${ENV_PGID}
  - TZ=${TIMEZONE}
volumes:
  - ${SERVICES_DIR}/jellyfin:/config
  - ${DATA_DIR}/media:/data/media
labels:
  - "traefik.enable=true"
  - "traefik.http.routers.dmc-jellyfin.rule=Host(`${SUB_DOMAIN_JELLYFIN}.${DOMAIN}`)"
  - "traefik.http.routers.dmc-jellyfin.tls=true"
  - "traefik.http.services.dmc-jellyfin.loadbalancer.server.port=8096"
  - "traefik.http.routers.dmc-jellyfin.tls.certresolver=letsencrypt"
  - "traefik.docker.network=global"

transmission: image: lscr.io/linuxserver/transmission:latest restart: unless-stopped networks:

EdyTheCow commented 1 year ago

Looks like there's something wrong with file permissions. It could be as simple as defining correct IDs for ENV_PUID and ENV_PGID. By default both of them are set to 1000, to find your user and group IDs type id into the terminal and you should get something like this:

8mhLL1X

Now in /dmc/compose/.env set your uid as ENV_PUID and gid as ENV_PGID. That should make the container match your file permissions with the host.

MachineSaver commented 1 year ago

Eddy, I tried this but the id command results in a ENV_puid and ENV_guid of 1000 which are the values set in the .env file. Despite doing this I still have permission errors when using transmission to download and save to data/downloads/complete.

This question might show some of ignorance of the way docker handles the memory/folder which will store the movie/tv files that are served to jellyfin, but if I have the containers running can I simply load the video files into this folder: /home/username/docker-media-center/dmc/data/downloads?

Is this also the location that transmission is depositing downloads as set by the "download to" setting within transmission to?

/data/downloads/complete

Or would you want to set that value in the transmission UI to a complete path such as: /home/username/docker-media-center/dmc/data/downloads?

EdyTheCow commented 1 year ago

If you want to change the path for all media files, simply change the DATA_DIR variable in .env file. For your mentioned path, you would want to set it as /home/username/docker-media-center/dmc/data.

Do not change any paths inside Transmission unless otherwise stated in the guide. Transmission does not see your home directory or any of your files outside its container. The defined volume ${DATA_DIR}/downloads:/data/downloads in docker-compose.yml simply mounts path /data/downloads from inside of Transmission container to outside the container path ${DATA_DIR}/downloads. This also means the download path within Transmission should be set to /data/downloads, otherwise Docker won't be able to mount the correct directory as defined in volumes.

So if you set DATA_DIR to /home/username/docker-media-center/dmc/data the Transmission downloads folder will show up in /home/username/docker-media-center/dmc/data/downloads.