Spksrc: ruTorrent errors (3.10-9)

Created on 9 Dec 2020  路  32Comments  路  Source: SynoCommunity/spksrc

Actual behavior

ruTorrent launches and runs, but produces errors in its own log.

Setup

_Package Name:_ ruTorrent
_Package Version:_ 3.10-9
_Package url:_ https://packages.synocommunity.com/rutorrent/9/rutorrent.v9.f15047[apollolake-avoton-braswell-broadwell-broadwellnk-bromolow-cedarview-denverton-dockerx64-geminilake-grantley-purley-kvmx64-v1000-x86-x86_64].spk
_NAS Model:_ DS918+
_NAS Architecture:_ apollolake
_DSM version:_ DSM 6.2.3-25426 Update 2

Steps to reproduce

_1._ I installed the package without disabling open_baseddir during install.
_2._ ruTorrent launched and it produced the errors in its own log.
_3._ I reinstalled the package, this time disabling open_basedir via the installer.
_4._ ruTorrent didn't launch anymore.
_5._ I reinstalled the package a couple more times.
_6._ Now ruTorrent launches again, but still produces the same errors as before.
_7._ I have the php 5.3, 7.0 and 7.3 packages installed. ruTorrent doesn't launch without 5.3.
_8._ I have changed the setting _"customize open_basedir"_ in web station to :/ for all php versions, but didn't help.

ruTorrent log

[09.12.2020 14:15:10] WebUI started.
[09.12.2020 14:15:10] _cloudflare: Plugin will not work. Webserver user can't access external program (python).
[09.12.2020 14:15:10] unpack: Plugin will not work. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] loginmgr: Some functionality will be unavailable. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] ratio: Some functionality will be unavailable. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] autotools: Plugin will not work. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] rss: Plugin will not work. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] datadir: Plugin will not work. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] scheduler: Plugin will not work. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] _task: Plugin will not work. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] xmpp: Plugin will not work. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] retrackers: Plugin will not work. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] rutracker_check: Plugin will not work. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] trafic: Plugin will not work. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] create: Plugin will not work. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] history: Plugin will not work. rTorrent user can't access external program (php).
[09.12.2020 14:15:10] screenshots: Plugin will not work. rTorrent user can't access external program (ffmpeg).
[09.12.2020 14:15:10] rss: Some functionality will be unavailable. rTorrent user can't access external program (curl).
[09.12.2020 14:15:10] _task: Plugin will not work. rTorrent user can't access external program (pgrep).
[09.12.2020 14:15:10] spectrogram: Plugin will not work. rTorrent user can't access external program (sox).
[09.12.2020 14:15:10] mediainfo: Plugin will not work. rTorrent user can't access external program (mediainfo).
bug

All 32 comments

@defaultsecurity I'd be interested in comparing your default directory permissions in comparison to mine to help figure out where the issue might be so I can replicate your issue.

But first, are you able to download a torrent currently? Debian Linux distribution CD images are easy torrent to test with such as:

Also, are you able to login in console mode using ssh or similar in order to provide the output of the following directory permissions settings such as (you will be prompted for a passwd for admin sudo command access):

$ sudo synoacltool -get /var/services/web
ACL version: 1 
Archive: has_ACL,is_support_ACL 
Owner: [root(user)] 
--------------------- 
     [0] group:media:deny:rwxpdDaARWcCo:fd--  (level:0)
     [1] group:administrators:allow:rwxpdDaARWc--:fd--  (level:0)
     [2] user:sc-rutorrent:allow:r-x---a-R----:---n  (level:0)
     [3] user:http:allow:r-x---a-R-c--:fd--  (level:0)
     [4] group:http:allow:r-x---a-R-c--:fd--  (level:0)
     [5] user:sc-rutorrent:allow:--x----------:---n  (level:0)

$ sudo synoacltool -get /var/services/web/rutorrent
(synoacltool.c, 359)It's Linux mode

$ sudo synoacltool -get /var/services/web/rutorrent/share
ACL version: 1 
Archive: has_ACL,is_support_ACL 
Owner: [sc-rutorrent(user)] 
--------------------- 
     [0] everyone::allow:r-x----------:fd--  (level:0)
     [1] group:http:allow:rwxp-D-------:fd--  (level:0)
     [2] group:rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
     [3] user:sc-rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
     [4] user:http:allow:rwxp-D-------:fd--  (level:0)

$ ls -lad /var/services/web /var/services/web/rutorrent /var/services/web/rutorrent/share
lrwxrwxrwx+ 1 root         root       12 Nov 27  2017 /var/services/web -> /volume1/web
drwxr-xr-x  1 sc-rutorrent rutorrent 202 Dec  5 11:09 /var/services/web/rutorrent
drwxrwxr-x+ 1 sc-rutorrent http       60 Jun 26 18:41 /var/services/web/rutorrent/share

$ ls -lad /var/packages/rutorrent/target/*
drwxr-xr-x  1 sc-rutorrent rutorrent   24 Dec  5 15:02 /var/packages/rutorrent/target/app
drwxr-xr-x  1 sc-rutorrent rutorrent  574 Dec  5 15:03 /var/packages/rutorrent/target/bin
drwxr-xr-x  1 root         root        32 Dec  5 15:03 /var/packages/rutorrent/target/env
drwxr-xr-x  1 sc-rutorrent rutorrent    6 Dec  5 15:02 /var/packages/rutorrent/target/etc
drwxr-xr-x  1 sc-rutorrent rutorrent 4568 Dec  5 15:02 /var/packages/rutorrent/target/lib
drwxr-xr-x  1 sc-rutorrent rutorrent   12 Dec  5 15:02 /var/packages/rutorrent/target/sbin
drwxr-xr-x  1 sc-rutorrent rutorrent   46 Dec  5 15:02 /var/packages/rutorrent/target/share
drwxrwxr-x+ 1 sc-rutorrent http         0 Dec  8 20:45 /var/packages/rutorrent/target/tmp
drwxr-xr-x  1 sc-rutorrent rutorrent    6 Dec  5 15:02 /var/packages/rutorrent/target/usr
drwxr-xr-x  1 sc-rutorrent rutorrent  130 Dec  5 15:03 /var/packages/rutorrent/target/var

$ sudo synoacltool -get /var/packages/rutorrent/target/tmp
Password: 
ACL version: 1 
Archive: has_ACL,is_support_ACL 
Owner: [sc-rutorrent(user)] 
--------------------- 
     [0] everyone::allow:r-x----------:fd--  (level:0)
     [1] group:http:allow:rwxp-D-------:fd--  (level:0)
     [2] group:rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
     [3] user:sc-rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
     [4] user:http:allow:rwxp-D-------:fd--  (level:0)

Also would be needed the output of your rutorrent php config file, mainly the pathToExternals section such as:

$ sed -n '/pathToExternals/,/)/p' /var/services/web/rutorrent/conf/config.php
    $pathToExternals = array(
        "php"   => '/bin/php',          // Something like /usr/bin/php. If empty, will be found in PATH.
        "curl"  => '/volume1/@appstore/rutorrent/bin/curl',         // Something like /usr/bin/curl. If empty, will be found in PATH.
        "gzip"  => '/bin/gzip',         // Something like /usr/bin/gzip. If empty, will be found in PATH.
        "id"    => '/bin/id',           // Something like /usr/bin/id. If empty, will be found in PATH.
        "stat"  => '/bin/stat',         // Something like /usr/bin/stat. If empty, will be found in PATH.
        "python"=> '/volume1/@appstore/rutorrent/env/bin/python3',          // Something like /usr/bin/python3. If empty, will be found in PATH
        "pgrep" => '/volume1/@appstore/rutorrent/bin/pgrep',            // Something like /usr/bin/pgrep. If empty, will be found in PATH 
        "sox"   => '/volume1/@appstore/rutorrent/bin/sox',          // Something like /usr/bin/sox. If empty, will be found in PATH
        "mediainfo" => '/volume1/@appstore/rutorrent/bin/mediainfo',            // Something like /usr/bin/mediainfo. If empty, will be found in PATH
    );

@defaultsecurity btw, don't hesitate to let me know if providing the information with the method above is an issue to you, I can provide you with an easier method as needed.

@darrell2691 in order to help tracking the issue feel free to jump in if you can provide requested ouput as mentioned from my previous comments above.

@th0ma7
Yes, I can provide anything you need and I offer my help with testing. I'm really glad you decided to fix ruTorrent.

Adding torrents

Torrents are added successfully and are downloaded successfully to the default folder. Added torrents don't start automatically, they stay in stopped state, but I can start them manually.

Permissions and listings

sudo synoacltool -get /var/services/web
ACL version: 1
Archive: has_ACL,is_support_ACL
Owner: [root(user)]
---------------------
         [0] user::deny:rwxpdDaARWcCo:fd--  (level:0)
         [1] user:*****:deny:rwxpdDaARWcCo:fd--  (level:0)
         [2] user:*****:deny:rwxpdDaARWcCo:fd--  (level:0)
         [3] group:administrators:allow:rwxpdDaARWc--:fd--  (level:0)
         [4] user:http:allow:r-x---a-R-c--:fd--  (level:0)
         [5] group:http:allow:--x----------:---n  (level:0)
         [6] user::allow:rwxpdDaARWc--:fd--  (level:0)
         [7] user::allow:rwxpdDaARWc--:fd--  (level:0)

sudo synoacltool -get /var/services/web/rutorrent
(synoacltool.c, 359)It's Linux mode

sudo synoacltool -get /var/services/web/rutorrent/share
ACL version: 1
Archive: has_ACL,is_support_ACL
Owner: [sc-rutorrent(user)]
---------------------
         [0] everyone::allow:r-x----------:fd--  (level:0)
         [1] group:http:allow:rwxp-D-------:fd--  (level:0)
         [2] group:rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
         [3] user:sc-rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
         [4] user:http:allow:rwxp-D-------:fd--  (level:0)

ls -lad /var/services/web /var/services/web/rutorrent /var/services/web/rutorrent/share
lrwxrwxrwx+ 1 root         root       12 Dec 16  2017 /var/services/web -> /volume1/Web
drwxr-xr-x  1 sc-rutorrent rutorrent 202 Dec  5 17:10 /var/services/web/rutorrent
drwxrwxr-x+ 1 sc-rutorrent http       60 Jun 27 00:41 /var/services/web/rutorrent/share

ls -lad /var/packages/rutorrent/target/*
drwxr-xr-x  1 sc-rutorrent rutorrent   24 Dec  5 21:02 /var/packages/rutorrent/target/app
drwxr-xr-x  1 sc-rutorrent rutorrent  574 Dec  6 00:49 /var/packages/rutorrent/target/bin
drwxr-xr-x  1 sc-rutorrent rutorrent    6 Dec  5 21:02 /var/packages/rutorrent/target/etc
drwxr-xr-x  1 sc-rutorrent rutorrent 4568 Dec  5 21:02 /var/packages/rutorrent/target/lib
drwxr-xr-x  1 sc-rutorrent rutorrent   12 Dec  5 21:02 /var/packages/rutorrent/target/sbin
drwxr-xr-x  1 sc-rutorrent rutorrent   46 Dec  5 21:02 /var/packages/rutorrent/target/share
drwxrwxr-x+ 1 sc-rutorrent http         0 Dec  9 07:35 /var/packages/rutorrent/target/tmp
drwxr-xr-x  1 sc-rutorrent rutorrent    6 Dec  5 21:02 /var/packages/rutorrent/target/usr
drwxr-xr-x  1 sc-rutorrent rutorrent  130 Dec  9 01:22 /var/packages/rutorrent/target/var

sudo synoacltool -get /var/packages/rutorrent/target/tmp
ACL version: 1
Archive: has_ACL,is_support_ACL
Owner: [sc-rutorrent(user)]
---------------------
         [0] everyone::allow:r-x----------:fd--  (level:0)
         [1] group:http:allow:rwxp-D-------:fd--  (level:0)
         [2] group:rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
         [3] user:sc-rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
         [4] user:http:allow:rwxp-D-------:fd--  (level:0)

Config

sed -n '/pathToExternals/,/)/p' /var/services/web/rutorrent/conf/config.php
        $pathToExternals = array(
                "php"   => '/bin/php',                  // Something like /usr/b      in/php. If empty, will be found in PATH.
                "curl"  => '/volume1/@appstore/rutorrent/bin/curl',            /      / Something like /usr/bin/curl. If empty, will be found in PATH.
                "gzip"  => '/bin/gzip',                 // Something like /usr/b      in/gzip. If empty, will be found in PATH.
                "id"    => '/bin/id',                   // Something like /usr/b      in/id. If empty, will be found in PATH.
                "stat"  => '/bin/stat',                 // Something like /usr/b      in/stat. If empty, will be found in PATH.
                "python"=> '/volume1/@appstore/rutorrent/env/bin/python3',     /      / Something like /usr/bin/python3. If empty, will be found in PATH
                "pgrep" => '/volume1/@appstore/rutorrent/bin/pgrep',           /      / Something like /usr/bin/pgrep. If empty, will be found in PATH
                "sox"   => '/volume1/@appstore/rutorrent/bin/sox',             /      / Something like /usr/bin/sox. If empty, will be found in PATH
                "mediainfo"     => '/volume1/@appstore/rutorrent/bin/mediainfo',      // Something like /usr/bin/mediainfo. If empty, will be found in PATH
        );

I have the same issue
NAS Model: DS3615xs
NAS Architecture: bromolow
DSM version: DSM 6.2.3-25426 Update 2

Actual behaviour

I did a clean install of DSM 6.2.3, Installed Web Station, Apache 2.4, PHP 5.6 and Rutorrent 3.10-9
Also tired newer PHP version 7.4 with same result

I recived same errors, but adding and downloading torrent have worked.
Added torrent, but it didn't start automatic download, after manual start everything worked, even torrent auto add from watched directory worked but also downloading didn't start automatically.

Permissions

sudo synoacltool -get /var/services/web
ACL version: 1
Archive: has_ACL,is_support_ACL
Owner: [root(user)]
---------------------
         [0] group:administrators:allow:rwxpdDaARWc--:fd--  (level:0)
         [1] user:http:allow:r-x---a-R-c--:fd--  (level:0)
         [2] group:http:allow:r-x---a-R-c--:fd--  (level:0)

sudo synoacltool -get /var/services/web/rutorrent
(synoacltool.c, 359)It's Linux mode

sudo synoacltool -get /var/services/web/rutorrent/share
ACL version: 1
Archive: has_ACL,is_support_ACL
Owner: [sc-rutorrent(user)]
---------------------
         [0] everyone::allow:r-x----------:fd--  (level:0)
         [1] group:http:allow:rwxp-D-------:fd--  (level:0)
         [2] group:rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
         [3] user:sc-rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
         [4] user:http:allow:rwxp-D-------:fd--  (level:0)

ls -lad /var/services/web /var/services/web/rutorrent /var/services/web/rutorrent/share
lrwxrwxrwx+ 1 root         root       12 Dec  9 08:14 /var/services/web -> /volume1/web
drwxr-xr-x  1 sc-rutorrent rutorrent 202 Dec  5 17:10 /var/services/web/rutorrent
drwxrwxr-x+ 1 sc-rutorrent http       60 Jun 27 00:41 /var/services/web/rutorrent/share

ls -lad /var/packages/rutorrent/target/*
drwxr-xr-x  1 sc-rutorrent rutorrent   24 Dec  5 21:02 /var/packages/rutorrent/target/app
drwxr-xr-x  1 sc-rutorrent rutorrent  574 Dec  9 08:39 /var/packages/rutorrent/target/bin
drwxr-xr-x  1 sc-rutorrent rutorrent    6 Dec  5 21:02 /var/packages/rutorrent/target/etc
drwxr-xr-x  1 sc-rutorrent rutorrent 4568 Dec  5 21:02 /var/packages/rutorrent/target/lib
drwxr-xr-x  1 sc-rutorrent rutorrent   12 Dec  5 21:02 /var/packages/rutorrent/target/sbin
drwxr-xr-x  1 sc-rutorrent rutorrent   46 Dec  5 21:02 /var/packages/rutorrent/target/share
drwxrwxr-x+ 1 sc-rutorrent http         0 Dec  9 08:48 /var/packages/rutorrent/target/tmp
drwxr-xr-x  1 sc-rutorrent rutorrent    6 Dec  5 21:02 /var/packages/rutorrent/target/usr
drwxr-xr-x  1 sc-rutorrent rutorrent  130 Dec  9 08:39 /var/packages/rutorrent/target/var

sudo synoacltool -get /var/packages/rutorrent/target/tmp
ACL version: 1
Archive: has_ACL,is_support_ACL
Owner: [sc-rutorrent(user)]
---------------------
         [0] everyone::allow:r-x----------:fd--  (level:0)
         [1] group:http:allow:rwxp-D-------:fd--  (level:0)
         [2] group:rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
         [3] user:sc-rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
         [4] user:http:allow:rwxp-D-------:fd--  (level:0)

PHP config

 sed -n '/pathToExternals/,/)/p' /var/services/web/rutorrent/conf/config.php
        $pathToExternals = array(
                "php"   => '/bin/php',                  // Something like /usr/bin/php. If empty, will be found in PATH.
                "curl"  => '/volume1/@appstore/rutorrent/bin/curl',                     // Something like /usr/bin/curl. If empty, will be found in PATH.
                "gzip"  => '/bin/gzip',                 // Something like /usr/bin/gzip. If empty, will be found in PATH.
                "id"    => '/bin/id',                   // Something like /usr/bin/id. If empty, will be found in PATH.
                "stat"  => '/bin/stat',                 // Something like /usr/bin/stat. If empty, will be found in PATH.
                "python"=> '/volume1/@appstore/rutorrent/env/bin/python3',                      // Something like /usr/bin/python3. If empty, will be found in PATH
                "pgrep" => '/volume1/@appstore/rutorrent/bin/pgrep',                    // Something like /usr/bin/pgrep. If empty, will be found in PATH
                "sox"   => '/volume1/@appstore/rutorrent/bin/sox',                      // Something like /usr/bin/sox. If empty, will be found in PATH
                "mediainfo"     => '/volume1/@appstore/rutorrent/bin/mediainfo',                        // Something like /usr/bin/mediainfo. If empty, will be found in PATH
        );

On another device but wit DSM 6.1.7 i have different errors
NAS Model: DS3615xs
NAS Architecture: bromolow
DSM version: DSM 6.1.7-15284 Update 3

Actual behaviour

Updated ruTorrent from 3.7/8 to 3.10-9, there were no errors, but torrent wouldn't start

Upgrade from rutorrent 3 7

I than uninstalled rutorrent, rebooted DSM and did clean install of rutorrent 3.10-9 and i got different errors than in DSM v6.2.3
When adding torrent i only got message torrent failed to add.

Clean install

I also noticed than on DSM 6.1.7 rutorrent 3.10-9 there is no rutorrent folder in web directory. This this directory wasn't present in DSM 6.1.7 and rutorrent 3.7/8, but everything worked.
No rutorrent directory in web Shared Folder

Ind DSM 6.2.3 and rutorrent 3.10-9 this directory is present
new_rutorrent 6 2 3

Permissions (clean installation of rutorrent 3.10-9 on DSM 6.1.7)

sudo synoacltool -get /var/services/web
(synoacltool.c, 359)It's Linux mode

sudo synoacltool -get /var/services/web/rutorrent
(synoacltool.c, 359)It's Linux mode

sudo synoacltool -get /var/services/web/rutorrent/share
(synoacltool.c, 359)It's Linux mode

ls -lad /var/services/web /var/services/web/rutorrent /var/services/web/rutorrent/share
drwxr-xr-x 11 root         root      4096 Dec  6 23:49 /var/services/web
drwxr-xr-x 10 sc-rutorrent rutorrent 4096 Dec  5 17:10 /var/services/web/rutorrent
drwxr-xr-x  5 sc-rutorrent http      4096 Jun 27 00:41 /var/services/web/rutorrent/share

ls -lad /var/packages/rutorrent/target/*
drwxr-xr-x  3 sc-rutorrent rutorrent 4096 Dec  5 21:02 /var/packages/rutorrent/target/app
drwxr-xr-x  2 sc-rutorrent rutorrent 4096 Dec  6 23:49 /var/packages/rutorrent/target/bin
drwxr-xr-x  4 root         root      4096 Dec  6 23:50 /var/packages/rutorrent/target/env
drwxr-xr-x  3 sc-rutorrent rutorrent 4096 Dec  5 21:02 /var/packages/rutorrent/target/etc
drwxr-xr-x  3 sc-rutorrent rutorrent 4096 Dec  5 21:02 /var/packages/rutorrent/target/lib
drwxr-xr-x  2 sc-rutorrent rutorrent 4096 Dec  5 21:02 /var/packages/rutorrent/target/sbin
drwxr-xr-x  5 sc-rutorrent rutorrent 4096 Dec  5 21:02 /var/packages/rutorrent/target/share
drwxrwx---+ 2 sc-rutorrent http      4096 Dec  7 13:00 /var/packages/rutorrent/target/tmp
drwxr-xr-x  3 sc-rutorrent rutorrent 4096 Dec  5 21:02 /var/packages/rutorrent/target/usr
drwxr-xr-x  3 sc-rutorrent rutorrent 4096 Dec  7 13:00 /var/packages/rutorrent/target/var

sudo synoacltool -get /var/packages/rutorrent/target/tmp
ACL version: 1
Archive: has_ACL,is_support_ACL
Owner: [sc-rutorrent(user)]
---------------------
         [0] user:sc-rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
         [1] group:http:allow:rwxp-D-------:fd--  (level:0)
         [2] group:rutorrent:allow:rwxpdDaARWc--:fd--  (level:0)
         [3] user:http:allow:rwxp-D-------:fd--  (level:0)

PHP config

sed -n '/pathToExternals/,/)/p' /var/services/web/rutorrent/conf/config.php
        $pathToExternals = array(
                "php"   => '/bin/php',                  // Something like /usr/bin/php. If empty, will be found in PATH.
                "curl"  => '/volume1/@appstore/rutorrent/bin/curl',                     // Something like /usr/bin/curl. If empty, will be found in PATH.
                "gzip"  => '/bin/gzip',                 // Something like /usr/bin/gzip. If empty, will be found in PATH.
                "id"    => '/bin/id',                   // Something like /usr/bin/id. If empty, will be found in PATH.
                "stat"  => '/bin/stat',                 // Something like /usr/bin/stat. If empty, will be found in PATH.
                "python"=> '/volume1/@appstore/rutorrent/env/bin/python3',                      // Something like /usr/bin/python3. If empty, will be found in PATH
                "pgrep" => '/volume1/@appstore/rutorrent/bin/pgrep',                    // Something like /usr/bin/pgrep. If empty, will be found in PATH
                "sox"   => '/volume1/@appstore/rutorrent/bin/sox',                      // Something like /usr/bin/sox. If empty, will be found in PATH
                "mediainfo"     => '/volume1/@appstore/rutorrent/bin/mediainfo',                        // Something like /usr/bin/mediainfo. If empty, will be found in PATH
        );

@IceCold3000 At first glance on your DSM 6.1.7 device it looks like ACL isn't enabled on your web repository.
Have a look at https://github.com/SynoCommunity/spksrc/wiki/Permission-Management where you'll find how to convert to ACL your web folder from the file station.

sudo synoacltool -get /var/services/web
(synoacltool.c, 359)It's Linux mode

sudo synoacltool -get /var/services/web/rutorrent
(synoacltool.c, 359)It's Linux mode

sudo synoacltool -get /var/services/web/rutorrent/share
(synoacltool.c, 359)It's Linux mode

ls -lad /var/services/web /var/services/web/rutorrent /var/services/web/rutorrent/share
drwxr-xr-x 11 root         root      4096 Dec  6 23:49 /var/services/web
drwxr-xr-x 10 sc-rutorrent rutorrent 4096 Dec  5 17:10 /var/services/web/rutorrent
drwxr-xr-x  5 sc-rutorrent http      4096 Jun 27 00:41 /var/services/web/rutorrent/share

@defaultsecurity and @IceCold3000 on your DSM 6.2.3 device I noticed one difference being granting access to user sc-rutorrent over the web folder. Can you try setting only the following permissions so sc-rutorrent user can Traverse folders/Execute files on it and see if it solves the issue?

permissionss-GROUP-rutorrent-web-folder

I've tested that on my end and was able to reproduce your error. If this solves your issue I'll create an updated testing package for you to test to confirm it solves your issue.

Oh, I realised I don't have a rutorrent user

@darrell2691 you should have a sc-rutorrent user. Applying the same solution above should also fix your issue.

Reinstall the new version, and followed instructions.. now I am having this error

[09.12.2020 21:04:08] WebUI started.
[09.12.2020 21:04:08] _cloudflare: Plugin will not work. Webserver user can't access external program (python).
[09.12.2020 21:04:09] JS error: [https://xxx.com/rutorrent/ : 5061] Uncaught TypeError: Cannot read property 'flabel_cont' of undefined
[09.12.2020 21:04:18] JS error: [https://xxx.com/rutorrent/js/webui.js : 1442] Uncaught TypeError: Cannot read property 'state' of undefined

I can add, but can't start the torrent. Every click gives the JS error again

Also ran into these issues..

After adding the new user sc-rutorrent to the appropriate groups for access to web services, I was still experiencing client side issues in the rutorrent UI, like others have reported above (related to plugins not working, specifically pgrep, and by way of dependency _task.

It came down to two things for me:

  1. After poking around I found a error in /var/services/web/rutorrent/conf/config.php. Specifically around lines, :60-:61

Strangely, the line defining pgrep's path was appended to a line _after_ a comment, like so:
$tempDirectory = '/usr/local/rutorrent/tmp'; // Temp directory. Absolute path with trail slash. If null, then autodetect will be used. $pathToExternals['pgrep'] = '/volume1/@appstore/rutorrent/bin/pgrep'; // Something like /usr/bin/pgrep. If empty, will be found in PATH

After placing a line break appropriately and reloading rutorrent I was good to go there. I suspect this file didn't have a new line at EOF, and thus the changes were appended to the last line after a comment.

  1. _cloudflare plugin was not loading, so I just disabled it -- I didn't really need/want it anyways.

  2. Much rejoicing.

If you're still having issues number 1 is worth taking a look at.

@th0ma7

  • Yes! Granting traverse folders/Execute permission for sc-rutorrent user for the web folder, fixed all the ruTorrent errors, except for _cloudflare_.
  • Added torrent files now start automatically as well.
  • Could you explain what is the deal with the open_basedir setting during package install? Do we need to enable it? Where does the installer modify the system settings?

@IceCold3000 At first glance on your DSM 6.1.7 device it looks like ACL isn't enabled on your web repository.
Have a look at https://github.com/SynoCommunity/spksrc/wiki/Permission-Management where you'll find how to convert to ACL your web folder from the file station.

sudo synoacltool -get /var/services/web
(synoacltool.c, 359)It's Linux mode

sudo synoacltool -get /var/services/web/rutorrent
(synoacltool.c, 359)It's Linux mode

sudo synoacltool -get /var/services/web/rutorrent/share
(synoacltool.c, 359)It's Linux mode

ls -lad /var/services/web /var/services/web/rutorrent /var/services/web/rutorrent/share
drwxr-xr-x 11 root         root      4096 Dec  6 23:49 /var/services/web
drwxr-xr-x 10 sc-rutorrent rutorrent 4096 Dec  5 17:10 /var/services/web/rutorrent
drwxr-xr-x  5 sc-rutorrent http      4096 Jun 27 00:41 /var/services/web/rutorrent/share

Convert to ACL was greyed out, so i guess it was already enabled
Screenshot 2020-12-09 163554
I also tired manually set permission for the web folder and reinstall rutorrent, but it's still empty.
Screenshot 2020-12-09 171726

i also tried, but it still won't switch to ACL permissions

synoacltool -add "/var/services/web/rutorrent/share/" "user:http:allow:rwxp-D------:fd"
(synoacltool.c, 140)It's Linux mode

sudo synoacltool -get /var/services/web
(synoacltool.c, 359)It's Linux mode

ls -lad /var/services/web /var/services/web/rutorrent /var/services/web/rutorrent/share
drwxr-xr-x 11 root         root      4096 Dec  6 23:49 /var/services/web
drwxr-xr-x 10 sc-rutorrent rutorrent 4096 Dec  5 17:10 /var/services/web/rutorrent
drwxr-xr-x  5 sc-rutorrent http      4096 Jun 27 00:41 /var/services/web/rutorrent/share

Well, looking at the details above something is wrong with your setup and needs fixing (and really is outside the scope of this bug entry). It seems your /var/services/web is a "fixed" directory in the root directory tree instead of being a symbolic link towards /volume1/web such as:

$ ls -la /var/services/
total 8
drwxr-xr-x   2 root root 4096 Sep 22 07:23 .
drwxr-xr-x  17 root root 4096 Oct 27 21:05 ..
lrwxrwxrwx   1 root root   18 Oct 31  2017 download -> /volume1/@download
lrwxrwxrwx+  1 root root   14 Sep 22 07:23 homes -> /volume1/homes
lrwxrwxrwx   1 root root   24 Oct 30  2017 pgsql -> /volume1/@database/pgsql
lrwxrwxrwx   1 root root   13 Sep 22 07:23 tmp -> /volume1/@tmp
lrwxrwxrwx+  1 root root   14 Dec 18  2018 video -> /volume1/video
lrwxrwxrwx+  1 root root   12 Nov 27  2017 web -> /volume1/web

Where the "real" destination path is /volume1/web. So your observation is right, your /volume1/web in FileStation is empty because rutorrent files probably sitting outside your volume1 due to the lack of that symbolic link. Once that is solved, a uninstall/reinstall of the package should get you closer to a resolution.

@defaultsecurity

* Yes! Granting `traverse folders/Execute` permission for sc-rutorrent user for the web folder, fixed all the ruTorrent errors, except for _cloudflare_.
* Added torrent files now start automatically as well.

Awesome! Great to know all is finally working out well. I'll see into incorporating a fix for that in an updated package.

* Could you explain what is the deal with the open_basedir setting during package install? Do we need to enable it? Where does the installer modify the system settings?

Sincerely I have no clue. @smaarn you probably know better than I do?

Also ran into these issues..
1. After poking around I found a error in /var/services/web/rutorrent/conf/config.php. Specifically around lines, :60-:61

Strangely, the line defining pgrep's path was appended to a line _after_ a comment, like so:
$tempDirectory = '/usr/local/rutorrent/tmp'; // Temp directory. Absolute path with trail slash. If null, then autodetect will be used. $pathToExternals['pgrep'] = '/volume1/@appstore/rutorrent/bin/pgrep'; // Something like /usr/bin/pgrep. If empty, will be found in PATH

After placing a line break appropriately and reloading rutorrent I was good to go there. I suspect this file didn't have a new line at EOF, and thus the changes were appended to the last line after a comment.

Excellent catch! Thnx for your feed back. I'll look into it by perhaps forcing a new line prior to appending additional items to it. I'll add that to the pile of fixes.

1. `_cloudflare` plugin was not loading, so I just disabled it -- I didn't really need/want it anyways.

I can't reproduce that error... would much like to solve this one as well while targeting a package update. Please share if you find something on that front.

2. Much rejoicing.

I'm glad you do :)

Ok i figured it out it out in /var/services/web i had some old inputs and files from early 2015 when i first installed rutorrent, and the installer didn't take care of them. I completely deleted /var/services/web reinstalled all packages and now i have those "can't access plug-ins" errors.
So it was only problem of my specific device configuration not the package issue.

_cloudflare` plugin was not loading

To solve this error you need to install Python3 package from Package center

_cloudflare` plugin was not loading

To solve this error you need to install Python3 package from Package center

@IceCold3000 good catch! Can you double check that it does solve the issue for you too @defaultsecurity and @mmccoy ?

Yes i can confirm that also for DSM 6.1.7 Granting `traverse folders/Execute fixes the plug-ins errors except for "_cloudflare".

And yes, uninstalling rutorrent, than installing python3 from community (not the basic synology one), rebooted device and installed rutorrent did fix the _cloudflare plug-in.
(Simply installing python3 after rutorrent installation didn't work for me, even after device reboot)

@th0ma7
The cloudflare fix worked for me as well. Thanks @IceCold3000. I had to do the same process. Install community python3, reboot, reinstall rutorrent.

So, I tried installing community python3 and reinstall rutorrent.. Cloudfare still doesn't work. Anyone with a clue on the python? I am not sure if adding a line after the comment in config.php works. Nonetheless, was a little confused because I can't seem to find the gap

[10.12.2020 13:20:24] _cloudflare: Plugin will not work. Webserver user can't access external program (python).
[10.12.2020 13:20:25] JS error: [https://xxx.com/rutorrent/ : 5088] Uncaught TypeError: Cannot read property 'flabel_cont' of undefined

I'm having a bit of difficulty with the settings. I changed the DHT port in the ruTorrent options popup window and it reverted after restarting the package. This happens with various Docker ruTorrent images as well, so no matter. Except those provide a folder with all the config files (ngix, php, rtorrent, rutorrent) and there we can edit them directly. Would it be possible to have the @appstore/rutorrent/var/.rtorrent.rc file somewhere in the /web/rutorrent folder instead? It has many hidden settings that can only be added by editing the file directly. Right now I can only edit the file using WinSCP, because it is buried within in the package.

I'm having a bit of difficulty with the settings. I changed the DHT port in the ruTorrent options popup window and it reverted after restarting the package. This happens with various Docker ruTorrent images as well, so no matter. Except those provide a folder with all the config files (ngix, php, rtorrent, rutorrent) and there we can edit them directly. Would it be possible to have the @appstore/rutorrent/var/.rtorrent.rc file somewhere in the /web/rutorrent folder instead? It has many hidden settings that can only be added by editing the file directly. Right now I can only edit the file using WinSCP, because it is buried within in the package.

It seems to me that the issue here is that it doesn't get saved. I'll have a look at it.

Yes i can confirm that also for DSM 6.1.7 Granting `traverse folders/Execute fixes the plug-ins errors except for "_cloudflare".

And yes, uninstalling rutorrent, than installing python3 from community (not the basic synology one), rebooted device and installed rutorrent did fix the _cloudflare plug-in.
(Simply installing python3 after rutorrent installation didn't work for me, even after device reboot)

Currently the python3 path is computed at installation time if, and only if, the python3 package is installed. That may actually be a bad idea we could reconsider. @th0ma7 what do you think ? Shouldn't we enforce the default python3 installation path directly, whatever python3 installation status is ?

I'm having a bit of difficulty with the settings. I changed the DHT port in the ruTorrent options popup window and it reverted after restarting the package. This happens with various Docker ruTorrent images as well, so no matter. Except those provide a folder with all the config files (ngix, php, rtorrent, rutorrent) and there we can edit them directly. Would it be possible to have the @appstore/rutorrent/var/.rtorrent.rc file somewhere in the /web/rutorrent folder instead? It has many hidden settings that can only be added by editing the file directly. Right now I can only edit the file using WinSCP, because it is buried within in the package.

@defaultsecurity after having a look into rutorrent and rtorrent it seems that the .rtorrent.rc file is never actually modified. It's more a script which is automatically read upon startup. If we're to actually update it the dev would be quite cumbersome (since people can basically put anything in there...).

Anyway, coming back to your suggestion, how would the "put it under the web directory" actually solve your issue ? How would you be editing it ? I'm curious because then we would need documenting it, obviously and explaining all the reasons.

@smaarn
Thanks for looking into it. I didn't know it wasn't supposed to be modified by the UI. As for my suggestion, with various ruTorrent docker images, during install you can specify a folder in which the config files are stored, including rtorrent.rc. I always specify a shared folder or a subfolder of the download folder itself. This way I can easily edit the rtorrent.rc file with any text editor, without the need for ssh or scp. Until now I always used docker images for running ruTorrent, I thought this was common practice.

@smaarn and @defaultsecurity one easy way to circumvent this could be done by moving .rtorrent.rc to /var/services/web/rutorrent/conf and create a symbolic link such as (permissions wise sc-rutorrent should be good to go):

/var/packages/rutorrent/target/var/.rtorrent.rc -> /var/services/web/rutorrent/conf/.rtorrent.rc

That would probably be easy enough to code for migration and recovery and allow users to edit the rtorrent config file directly using their favorite gui.

@th0ma7 According to this https://github.com/rakshasa/rtorrent/wiki/Common-Tasks-in-rTorrent#using-a-different-configuration-file rutorrent already has an option to load different configuration file from a more suitable location.

@th0ma7 According to this https://github.com/rakshasa/rtorrent/wiki/Common-Tasks-in-rTorrent#using-a-different-configuration-file rutorrent already has an option to load different configuration file from a more suitable location.

We would need, either way, to handle potential migrations for existing installs. Which would account for both options either way (e.g. symbolic link and direct import).

New packages are currently being built and will be made available shortly (allow up to 24-72h for proxy refresh).
Thnx to all who provided input to allow debugging this.
Please reopen or open a new issue as needed, cheers!

JS issue solve with clearing cache

Was this page helpful?
0 / 5 - 0 ratings