crazy-max / docker-rtorrent-rutorrent

rTorrent and ruTorrent Docker image
MIT License
501 stars 111 forks source link

Cross-seed incompatibility due to .rtlocal.rc #390

Closed strass closed 3 months ago

strass commented 3 months ago

Support guidelines

I've found a bug and checked that ...

Description

Cross-seed works by symlinking a torrent's files to a directory and then sending rTorrent a torrent file with the symlinked copy as the new torrent's save path. I believe that the directory.default.set designation in .rtlocal.rc is preventing cross-seed from being able to set the torrent's save path on injection.

Expected behaviour

I expect to be able to take control over my config if necessary.

Actual behaviour

When I edit .rtlocal.rc any changes are reverted as soon as rTorrent starts. I've tried setting the file as read-only but then the process fails during startup. I cannot find any other way to unset directory.default.set

Steps to reproduce

  1. Mount /etc/rtorrent/.rtlocal.rc to a path on docker host
  2. Attempt to modify .rtlocal.rc
  3. Start container
  4. File has been reverted back to a clean copy
  5. Start a search with cross-seed
  6. Injected files have save path of /downloads/temp instead of the one designated by cross-seed

Docker info

$ docker info
Client: Docker Engine - Community
 Version:    27.0.3
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.15.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.28.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 43
  Running: 42
  Paused: 0
  Stopped: 1
 Images: 52
 Server Version: 24.0.9
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: true
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 99b8088b873ba42b788f29ccd0dc26ebb6952f1e
 runc version: 51d5e94601ceffbbd85688df1c928ecccbfa4685
 init version: de40ad007797e0dcd8b7126f27bb87401d224240
 Security Options:
  seccomp
   Profile: builtin
  selinux
  cgroupns
 Kernel Version: 6.1.96-flatcar
 Operating System: Flatcar Container Linux by Kinvolk 3815.2.5 (Oklo)
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 15.56GiB
 Name: flatcar
 ID: 25d753f1-8d7b-4762-956d-dda84c77822a
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Docker Compose config

name: rtorrent-rutorrent
services:
  geoip-updater:
    ...
  rtorrent-rutorrent:
    container_name: rtorrent-rutorrent
    environment:
      AUTH_DELAY: 0s
      LOG_ACCESS: "true"
      LOG_IP_VAR: remote_addr
      MAX_FILE_UPLOADS: "50"
      MEMORY_LIMIT: 256M
      OPCACHE_MEM_SIZE: "128"
      PGID: "1000"
      PUID: "1000"
      REAL_IP_FROM: 0.0.0.0/32
      REAL_IP_HEADER: X-Forwarded-For
      RT_DHT_PORT: "6881"
      RT_INC_PORT: "50000"
      RT_LOG_EXECUTE: "false"
      RT_LOG_LEVEL: info
      RT_LOG_XMLRPC: "false"
      RU_DO_DIAGNOSTIC: "true"
      RU_FORBID_USER_SETTINGS: "false"
      RU_HTTP_TIME_OUT: "30"
      RU_HTTP_USE_GZIP: "true"
      RU_HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0
      RU_LOCALE: UTF8
      RU_LOG_FILE: /data/rutorrent/rutorrent.log
      RU_LOG_RPC_CALLS: "false"
      RU_LOG_RPC_FAULTS: "true"
      RU_OVERWRITE_UPLOADED_TORRENTS: "false"
      RU_PHP_GZIP_LEVEL: "2"
      RU_PHP_USE_GZIP: "false"
      RU_REMOVE_CORE_PLUGINS: httprpc
      RU_RPC_TIME_OUT: "5"
      RU_SAVE_UPLOADED_TORRENTS: "true"
      RU_SCHEDULE_RAND: "10"
      RUTORRENT_AUTHBASIC_STRING: ruTorrent restricted access
      RUTORRENT_PORT: "8080"
      TZ: America/Los_Angeles
      UPLOAD_MAX_SIZE: 16M
      WAN_IP_CMD: "false"
      WEBDAV_AUTHBASIC_STRING: WebDAV restricted access
      WEBDAV_PORT: "9077"
      XMLRPC_AUTHBASIC_STRING: rTorrent XMLRPC restricted access
      XMLRPC_PORT: "8000"
    expose:
      - 6881/udp
      - "8000"
      - "8080"
      - "9077"
      - "50000"
    image: crazymax/rtorrent-rutorrent:latest
    ports:
      - target: 6881
        published: "6881"
        protocol: udp
      - target: 8080
        published: "18077"
        protocol: tcp
      - target: 9077
        published: "9077"
        protocol: tcp
      - target: 50000
        published: "50000"
        protocol: tcp
    restart: always
    stop_grace_period: 6m0s
    ulimits:
      nofile:
        soft: 32000
        hard: 40000
      nproc: 65535
    volumes:
      - type: bind
        source: /opt/config/rtorrent/data
        target: /data
        bind:
          create_host_path: true
      - type: bind
        source: /opt/config/rtorrent/data/rtorrent/.rtlocal.rc
        target: /etc/rtorrent/.rtlocal.rc
        bind:
          create_host_path: true
      - type: bind
        source: /mnt/storage/downloads
        target: /downloads
        bind:
          create_host_path: true
      - type: bind
        source: /opt/config/rtorrent/passwd
        target: /passwd
        bind:
          create_host_path: true

Logs

rtorrent-rutorrent  | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
rtorrent-rutorrent  | [s6-init] ensuring user provided files have correct perms...exited 0.
rtorrent-rutorrent  | [fix-attrs.d] applying ownership & permissions fixes...
rtorrent-rutorrent  | [fix-attrs.d] done.
rtorrent-rutorrent  | [cont-init.d] executing container initialization scripts...
rtorrent-rutorrent  | [cont-init.d] 00-fix-logs.sh: executing... 
rtorrent-rutorrent  | [cont-init.d] 00-fix-logs.sh: exited 0.
rtorrent-rutorrent  | [cont-init.d] 01-fix-uidgid.sh: executing... 
rtorrent-rutorrent  | [cont-init.d] 01-fix-uidgid.sh: exited 0.
rtorrent-rutorrent  | [cont-init.d] 02-fix-perms.sh: executing... 
rtorrent-rutorrent  | Fixing perms...
rtorrent-rutorrent  | [cont-init.d] 02-fix-perms.sh: exited 0.
rtorrent-rutorrent  | [cont-init.d] 03-config.sh: executing... 
rtorrent-rutorrent  | Setting timezone to America/Los_Angeles...
rtorrent-rutorrent  | Setting PHP-FPM configuration...
rtorrent-rutorrent  | Setting PHP INI configuration...
rtorrent-rutorrent  | Setting OpCache configuration...
rtorrent-rutorrent  | Setting Nginx configuration...
rtorrent-rutorrent  | Setting Nginx XMLRPC over SCGI configuration...
rtorrent-rutorrent  | Setting Nginx ruTorrent configuration...
rtorrent-rutorrent  | Setting Nginx WebDAV configuration...
rtorrent-rutorrent  | Update healthcheck script...
rtorrent-rutorrent  | Initializing files and folders...
rtorrent-rutorrent  | Checking rTorrent local configuration...
rtorrent-rutorrent  | Checking rTorrent configuration...
rtorrent-rutorrent  | Bootstrapping ruTorrent configuration...
rtorrent-rutorrent  | Setting custom config for create plugin...
rtorrent-rutorrent  | Checking ruTorrent custom plugins...
rtorrent-rutorrent  | Checking ruTorrent plugins configuration...
rtorrent-rutorrent  | Checking ruTorrent custom themes...
rtorrent-rutorrent  | Setting GeoIP2 databases for geoip2 plugin...
rtorrent-rutorrent  | Fixing perms...
rtorrent-rutorrent  | [cont-init.d] 03-config.sh: exited 0.
rtorrent-rutorrent  | [cont-init.d] 04-create-services.sh: executing... 
rtorrent-rutorrent  | [cont-init.d] 04-create-services.sh: exited 0.
rtorrent-rutorrent  | [cont-init.d] ~-socklog: executing... 
rtorrent-rutorrent  | [cont-init.d] ~-socklog: exited 0.
rtorrent-rutorrent  | [cont-init.d] done.
rtorrent-rutorrent  | [services.d] starting services
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: using the "epoll" event method
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: nginx/1.24.0
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: OS: Linux 6.1.96-flatcar
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: getrlimit(RLIMIT_NOFILE): 32000:40000
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: start worker processes
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: start worker process 540
rtorrent-rutorrent  | [services.d] done.
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: start worker process 541
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: start worker process 542
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: start worker process 543
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: start worker process 549
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: start worker process 563
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: start worker process 588
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: start worker process 620
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: start worker process 647
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: start worker process 672
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: start worker process 696
rtorrent-rutorrent  | 2024/08/12 19:15:18 [notice] 509#509: start worker process 713
rtorrent-rutorrent  | [12-Aug-2024 19:15:18] NOTICE: fpm is running, pid 513
rtorrent-rutorrent  | [12-Aug-2024 19:15:18] NOTICE: ready to handle connections

Additional info

No response