wernight / docker-qbittorrent

Containerized qBittorrent NOX (i.e., headless)
https://registry.hub.docker.com/u/wernight/qbittorrent/
MIT License
48 stars 35 forks source link

Permissions problem running minimum setup #4

Closed teaguecl closed 8 years ago

teaguecl commented 8 years ago

Running without any parameters (as suggested in the readme) fails. Output below.

$ sudo docker run wernight/qbittorrent cp: can't create '/config/qBittorrent.conf': Permission denied

wernight commented 8 years ago

Thanks for reporting, fixing.

tobymurray commented 8 years ago

Pulling the latest container:

REPOSITORY             TAG                 IMAGE ID            CREATED             SIZE
wernight/qbittorrent   latest              95fb6a04bae1        2 days ago          78.67 MB

And running the command in the readme:

docker run -d --user $UID:$GID -p 8080:8080 -p 6881:6881/tcp -p 6881:6881/udp -v $PWD/config:/config -v $PWD/torrents:/torrents -v $PWD/downloads:/downloads wernight/qbitt orrent

Yields:

cp: can't create '/config/qBittorrent.conf': Permission denied

Everything appears to be owned by root

total 12
drwxr-xr-x 2 root root 4096 Oct  2 00:09 config
drwxr-xr-x 2 root root 4096 Oct  2 00:09 downloads
drwxr-xr-x 2 root root 4096 Oct  2 00:09 torrents
wernight commented 8 years ago

Make yourself owner of those directories. qBittorrent runs as your user with that command-line. May be I should say that you should create those directories yourself first?

tobymurray commented 8 years ago

May be I should say that you should create those directories yourself first?

It looks like you've done this now, and I think it makes it a bit more clear what's going on. Thanks! It's working for me wonderfully so far.

Markieta commented 7 years ago

Docker noob here. Took me far too long to realize that it's: -v [host]:[container] and not: -v [container]:[host]

Might be a good idea to update the Docker hub's description with what you put on GitHub: -v $PWD/config:/config

wernight commented 7 years ago

Done. It's supposed to do that automatically but it's too magic.