rtorrent-rutorrent icon indicating copy to clipboard operation
rtorrent-rutorrent copied to clipboard

rTorrent user & Webserver user cannot access... (synology, docker)

Open defaultsecurity opened this issue 7 years ago • 11 comments

After creating the container with docker, I can launch ruTorrent, but with errors.

Using rtorrent-rutorrent:latest installed today.

Hardware: DS918+ Architecture: Apollo Lake

Synology Packages:

  • Apache HTTP Server 2.4
  • PHP 7.0
  • Web Station

ENV Settings from Docker:

  • PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  • GRP_ID: set
  • USR_ID: set
  • NOIPV6: 1

Mount path "/downloads" set in Docker's volume settings

What is the Webserver user and the rTorrent user? Should I create new users for them in the synology settings? If yes, then what username/password?

LOG: [28.11.2017 13:11:00] WebUI started. [28.11.2017 13:11:00] Webserver user doesn't have read/write/execute access to the torrents directory. You cannot add torrents via ruTorrent. (/downloads/.rutorrent/torrents) [28.11.2017 13:11:00] Webserver user doesn't have read/write/execute access to the settings directory. ruTorrent settings cannot be saved. (/downloads/.rutorrent/settings) [28.11.2017 13:11:00] rTorrent user must have read/execute access to the torrents directory. You cannot add torrents via ruTorrent. (/downloads/.rutorrent/torrents) [28.11.2017 13:11:00] rTorrent user must have read/write/execute access to the settings directory. (/downloads/.rutorrent/settings) [28.11.2017 13:11:00] rutracker_check: Plugin will not work. Webserver user must have execute access to the rtorrent session directory (/downloads/.rtorrent/session/). [28.11.2017 13:11:00] _task: Some functionality will be unavailable. rTorrent user can't access external program (pgrep). [28.11.2017 13:11:00] autotools: Plugin will not work. rTorrent user can't access external program (php). [28.11.2017 13:11:00] create: Plugin will not work. rTorrent user can't access external program (php). [28.11.2017 13:11:00] datadir: Plugin will not work. rTorrent user can't access external program (php). [28.11.2017 13:11:00] history: Plugin will not work. rTorrent user can't access external program (php). [28.11.2017 13:11:00] loginmgr: Some functionality will be unavailable. rTorrent user can't access external program (php). [28.11.2017 13:11:00] ratio: Some functionality will be unavailable. rTorrent user can't access external program (php). [28.11.2017 13:11:00] retrackers: Plugin will not work. rTorrent user can't access external program (php). [28.11.2017 13:11:00] rss: Plugin will not work. rTorrent user can't access external program (php). [28.11.2017 13:11:00] rutracker_check: Plugin will not work. rTorrent user can't access external program (php). [28.11.2017 13:11:00] scheduler: Plugin will not work. rTorrent user can't access external program (php). [28.11.2017 13:11:00] trafic: Plugin will not work. rTorrent user can't access external program (php). [28.11.2017 13:11:00] unpack: Plugin will not work. rTorrent user can't access external program (php). [28.11.2017 13:11:00] xmpp: Plugin will not work. rTorrent user can't access external program (php). [28.11.2017 13:11:00] mediainfo: Plugin will not work. rTorrent user can't access external program (mediainfo). [28.11.2017 13:11:00] rss: Some functionality will be unavailable. rTorrent user can't access external program (curl). [28.11.2017 13:11:00] screenshots: Plugin will not work. rTorrent user can't access external program (ffmpeg). [28.11.2017 13:11:00] spectrogram: Plugin will not work. rTorrent user can't access external program (sox).

The folders logged above all exist.

defaultsecurity avatar Nov 28 '17 12:11 defaultsecurity

Having the same issue here on my synology box. Have you found a solution?

bille747 avatar Dec 04 '17 20:12 bille747

Nope, sorry. I tried everything I could think of. I'm clueless.

defaultsecurity avatar Dec 05 '17 07:12 defaultsecurity

Which USR_ID and GRP_ID did you set ?

pboiseau avatar Dec 31 '17 13:12 pboiseau

I'm actually running into the same issue, are those USR ID and GRP ID even mapped properly? using same ID for all linuxserver docker files and this is the only one that doesnt seem to work correctly...

codevski avatar Mar 17 '18 12:03 codevski

Did anyone solve this issue? I'm having the same issue on my Synology NAS. I'm using UID=1029, GID=100. The UID has full read/write to the folder I mapped to /downloads.

richardpowellus avatar May 03 '18 06:05 richardpowellus

I had the same issue, although not on on a Synology. I fixed it by doing chown -R 1000:1000 /path/to/downloadon the host machine. Those are default UID/GID.

JohnDoee avatar Nov 07 '18 19:11 JohnDoee

I just tried again right now, but still couldn't solve it. I've set up GRP_ID and USR_ID properly. I'm getting the same permission errors. The linuxserver/rutorrent container is working properly, so it couldn't be that hard to fix. I'd rather use this image because of autodl-irssi.

defaultsecurity avatar Nov 23 '18 00:11 defaultsecurity

Sorry for necromancy, but I think I've found a root cause of this.

There are really two users inside of the container:

  • USR_ID:GRP_ID - used for rtorrent
  • nginx:nginx - used for nginx In case if /downloads has USR_ID:GRP_ID ownership with 700 permissions (in my case it was by default) nginx user can't access that directory (despite what /downloads/.rutorrent is owned by nginx:nginx). And to fix it you need to do this:
chmod o+rx /path/to/download

spoooyders avatar Dec 11 '22 04:12 spoooyders

Sorry for necromancy, but I think I've found a root cause of this.

There are really two users inside of the container:

  • USR_ID:GRP_ID - used for rtorrent
  • nginx:nginx - used for nginx In case if /downloads has USR_ID:GRP_ID ownership with 700 permissions (in my case it was by default) nginx user can't access that directory (despite what /downloads/.rutorrent is owned by nginx:nginx). And to fix it you need to do this:
chmod o+rx /path/to/download

in my case there was no torrent directory at all, i created the torrent directory manually and it worked.

halilnevzat avatar Dec 20 '22 12:12 halilnevzat

Sorry for necromancy, but I think I've found a root cause of this.

There are really two users inside of the container:

  • USR_ID:GRP_ID - used for rtorrent
  • nginx:nginx - used for nginx In case if /downloads has USR_ID:GRP_ID ownership with 700 permissions (in my case it was by default) nginx user can't access that directory (despite what /downloads/.rutorrent is owned by nginx:nginx). And to fix it you need to do this:
chmod o+rx /path/to/download

I think that is the exact problem because rutorrent manages to create the folders it needs, however the webserver doesn't have access to read it (i.e nginx). @spoooyders when you say chmod path to download, do you mean inside the container or the mount folder on the host? I tried that chmod on the host but didn't work.

Btw, this problem only happens for me on my NAS smb share mount folder, if I pick a local folder, it works flawlessly

fmiguelmmartins avatar May 16 '23 11:05 fmiguelmmartins

@fmiguelmmartins on the host.

Compose file:

  rtorrent-rutorrent:
    image: diameter/rtorrent-rutorrent:latest-alpine
    volumes:
      - /home/user1/downloads:/downloads

Permissions:

>ls -lad /home/user1/downloads/
drwxr-xr-x 6 user1 user1 4096 Dec 11  2022 /home/user1/downloads/

So in my case it is 755 mode for downloads directory, but really 705 should be enough.

Inside the container:

>docker exec -it rutorrent_rtorrent-rutorrent_1 /bin/sh
/ # ls -lad /downloads
drwxr-xr-x    6 rtorrent rtorrent      4096 Dec 11  2022 /downloads

^ Note same 755 mode in a container, which is good.

/ # su -s /bin/sh nginx
/ $ id
uid=100(nginx) gid=101(nginx) groups=82(www-data),101(nginx),101(nginx)
/ $ ls -la /downloads/.rutorrent/
total 24
drwxrwxrwx    5 nginx    nginx         4096 Dec 11  2022 .
drwxr-xr-x    6 rtorrent rtorrent      4096 Dec 11  2022 ..
-rw-rw-rw-    1 nginx    nginx         1879 Dec 11  2022 errors.log
drwxrwxrwx    6 nginx    nginx         4096 Jul  1 11:34 settings
drwxr-xr-x    2 nginx    nginx         4096 Dec 11  2022 torrents
drwxrwxrwx    3 nginx    nginx         4096 Dec 11  2022 users

As you see nginx user can access downloads directory without issues.

spoooyders avatar Jul 01 '23 12:07 spoooyders