linuxserver / docker-transmission

GNU General Public License v3.0
577 stars 179 forks source link

[BUG] Incorrectly created complete/incomplete folders #256

Closed Lingxi-Li closed 1 year ago

Lingxi-Li commented 1 year ago

Is there an existing issue for this?

Current Behavior

I have following setup.

  1. Mounted a file share to /share and a local folder to /incomplete.
  2. Placed a pre-configured settings.json to /config before lighting up the container with following key settings.
    1. "download-dir": "/share/default"
    2. "incomplete-dir": "/incomplete"

After lighting up the container, I saw complete and incomplete folders created inside my file share. I searched the code base and found a hardcode here. Might be relevant.

Expected Behavior

User settings of incomplete and complete folders should be honored rather than making assumptions with hardcode. In my case, they should be /share/default and /incomplete, respectively.

Steps To Reproduce

  1. In docker-compose.yml, make following mounts
    • some_path:/incomplete
    • some_other_path:/share
  2. Place a pre-configured settings.json to /config before lighting up the container with following key settings
    • "download-dir": "/share/default"
    • "incomplete-dir": "/incomplete"
  3. Light up with sudo docker compose up -d
  4. Find incomplete and complete folders created inside some_other_path.

Environment

- OS: Debian 12 Bookworm
- How docker service was installed: Via Docker's package repository by following [this official guide](https://docs.docker.com/engine/install/debian/#set-up-the-repository)

CPU architecture

arm64

Docker creation

~~~
version: "3"

services:
  transmission:
    image: lscr.io/linuxserver/transmission:latest
    container_name: transmission
    environment:
      - PUID=0
      - PGID=0
      - TZ=Asia/Shanghai
    volumes:
      - /home/xxx/tm/cfg:/config
      - /home/xxx/tm/torrents:/watch
      - /home/xxx/tm/incomplete:/incomplete
      - /home/xxx/share:/share
    ports:
      - 9091:9091/tcp
      - 51413:51413/tcp
      - 51413:51413/udp
    restart: always
~~~

Container logs

~~~
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    0
User GID:    0
───────────────────────────────────────

# do daily/weekly/monthly maintenance
# min   hour    day     month   weekday command
*/15    *       *       *       *       run-parts /etc/periodic/15min
0       *       *       *       *       run-parts /etc/periodic/hourly
0       2       *       *       *       run-parts /etc/periodic/daily
0       3       *       *       6       run-parts /etc/periodic/weekly
0       5       1       *       *       run-parts /etc/periodic/monthly

# run daily blocklist update
0 3 * * * /app/blocklist-update.sh 2>&1
cp: not replacing '/config/crontabs/root'
[custom-init] No custom files found, skipping...
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    0
User GID:    0
───────────────────────────────────────

ln: failed to create symbolic link '/transmissionic/index.html': File exists
ln: failed to create symbolic link '/combustion-release/index.html': File exists
ln: failed to create symbolic link '/flood-for-transmission/index.html': File exists
ln: failed to create symbolic link '/kettu/index.html': File exists
ln: failed to create symbolic link '/transmission-web-control/index.html': File exists
[custom-init] No custom files found, skipping...
Connection to localhost (127.0.0.1) 9091 port [tcp/*] succeeded!
[ls.io-init] done.
~~~
github-actions[bot] commented 1 year 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 1 year ago

We only create folders in /downloads

Lingxi-Li commented 1 year ago

@Roxedus Thanks for the prompt response. Are you suggesting that the complete and incomplete folders in /share were created by Transmission itself?

Roxedus commented 1 year ago

That is a safe bet.