Wonderfall/dockerfiles

[flood] rtorrent: Could not lock session directory: "/data/.session/", Permission denied

gangefors opened this issue · 1 comments

I get different behaviours between my Ubuntu 17.10 laptop and my Synology DS1515+.

On Ubuntu it works like a charm (besideds some 401 http errors in the log on first startup before logging in the first time). But when I start the container the exact same way on my NAS I get permission errors from rtorrent.

Docker run command that I use:

docker run -dt \
    --name flood \
    -e UID=$(id -u) \
    -e GID=$(id -g) \
    -e FLOOD_SECRET=secretkey \
    -v /volume1/storage/.flood:/data \
    -p 49184:49184 \
    -p 3000:3000 \
    wonderfall/rtorrent-flood:0.9.6-0.13.6

Some outputs from the Synology NAS.

$ docker logs flood
GET /api/history?snapshot=fiveMin 401 3.934 ms - -
rtorrent: Could not lock session directory: "/data/.session/", Permission denied
rtorrent: Could not lock session directory: "/data/.session/", Permission denied
rtorrent: Could not lock session directory: "/data/.session/", Permission denied
rtorrent: Could not lock session directory: "/data/.session/", Permission denied
removed 0 entries from hourSnapshot
removed 0 entries from thirtyMinSnapshot
removed 0 entries from weekSnapshot
removed 0 entries from daySnapshot
rtorrent: Could not lock session directory: "/data/.session/", Permission denied
rtorrent: Could not lock session directory: "/data/.session/", Permission denied
rtorrent: Could not lock session directory: "/data/.session/", Permission denied
rtorrent: Could not lock session directory: "/data/.session/", Permission denied
GET /api/stats 401 109.571 ms - -
GET /api/history?snapshot=fiveMin 401 80.518 ms - -
Connection refused at /tmp/rtorrent.sock:undefined. Check these values in config.js and ensure that rTorrent is running.
Connection refused at /tmp/rtorrent.sock:undefined. Check these values in config.js and ensure that rTorrent is running.


$ docker exec flood-0.9.6-0.13.6 ls -la /data
total 24
drwxr-xr-x    6 1026     users         4096 Nov  2 21:12 .
drwxr-xr-x   52 root     root          4096 Nov  2 21:12 ..
drwxr-xr-x    2 1026     users         4096 Nov  2 21:12 .session
drwxr-xr-x    2 1026     users         4096 Nov  2 21:12 .watch
drwxr-xr-x    6 1026     users         4096 Nov  2 21:12 Media
drwxr-xr-x    2 1026     users         4096 Nov  2 21:12 torrents

$ docker info
Containers: 3
 Running: 3
 Paused: 0
 Stopped: 0
Images: 9
Server Version: 1.11.2
Storage Driver: aufs
 Root Dir: /volume1/@docker/aufs
 Backing Filesystem: extfs
 Dirs: 67
 Dirperm1 Supported: true
Logging Driver: db
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge null host
Kernel Version: 3.10.102
Operating System: <unknown>
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.67 GiB
Name: midgard
ID: QTHI:PGBZ:TRQH:4DVC:62AH:PZVM:LXI4:MILR:OSSO:IIUZ:WAZF:IQ4X
Docker Root Dir: /volume1/@docker
Debug mode (client): false
Debug mode (server): false
Username: gangefors
Registry: https://index.docker.io/v1/
WARNING: No kernel memory limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support

Some info from the Ubuntu machine.

# Logs looks normal so I wont include them here

$ docker exec flood-0.9.6-0.13.6 ls -la /data
total 24
drwxr-xr-x    6 1000     1000          4096 Nov  2 20:59 .
drwxr-xr-x    1 root     root          4096 Nov  2 21:10 ..
drwxr-xr-x    2 1000     1000          4096 Nov  2 21:10 .session
drwxr-xr-x    2 1000     1000          4096 Nov  2 20:59 .watch
drwxr-xr-x    6 1000     1000          4096 Nov  2 20:59 Media
drwxr-xr-x    2 1000     1000          4096 Nov  2 20:59 torrents

$ docker info
Containers: 7
 Running: 1
 Paused: 0
 Stopped: 6
Images: 125
Server Version: 17.05.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.13.0-16-lowlatency
Operating System: Ubuntu 17.10
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.27GiB
Name: nyx
ID: UNLG:YZWE:UPH5:THMC:XSPN:TWXR:KSYT:YBWW:G3ZZ:LFVA:5JHU:JCKT
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: gangefors
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

Any ideas of what might be wrong?

It seems that this has nothing to do with the docker image but with Synology NAS. Because when I mount /data as a named docker volume it works as expected.
There is something wierd about host mounts when using Docker on a Synology Diskstation.