rTorrent's user can't access X program/interpreter.

shwetha17

Member
May 24, 2018
785
0
16
Hello,

I have been running ruTorrent 3.0 for sometime now without any problems on my Asus RT-N16 with Tomato until I upgraded to 3.1 with all the plug-ins excluding darkpal and unpack.
Now I'm receiving the errors below.
[26.06.2010 15:09:51] rTorrent's user can't access 'id' program. Some functionality will be unavailable.
[26.06.2010 15:09:53] Autotools plugin: rTorrent's user can't access php interpreter. Plugin will not work.
[26.06.2010 15:09:53] Retrackers plugin: rTorrent's user can't access php interpreter. Plugin will not work.
[26.06.2010 15:09:53] RSS plugin: rTorrent's user can't access php interpreter. Plugin will not work.
[26.06.2010 15:09:53] Traffic plugin: rTorrent's user can't access php interpreter. Plugin will not work.
[26.06.2010 15:09:53] Scheduler plugin: rTorrent's user can't access php interpreter. Plugin will not work.
[26.06.2010 15:09:53] RSS plugin: rTorrent's user can't access curl program. You will not be able to work with https feeds.
Here is my config.php file.
Code:
<?php
// configuration parameters

// for snoopy client
@define(&#39;HTTP_USER_AGENT&#39;, &#39;Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0&#39;, true);
@define(&#39;HTTP_TIME_OUT&#39;, 30, true); // in seconds
@define(&#39;HTTP_USE_GZIP&#39;, true, true);

@define(&#39;RPC_TIME_OUT&#39;, 5, true); // in seconds

@define(&#39;LOG_RPC_CALLS&#39;, false, true);
@define(&#39;LOG_RPC_FAULTS&#39;, true, true);

// for php
@define(&#39;PHP_USE_GZIP&#39;, false, true);
@define(&#39;PHP_GZIP_LEVEL&#39;, 2, true);

$do_diagnostic = true;
$log_file = &#39;/tmp/errors.log&#39;; // path to log file (comment or make empty to disable logging)
$saveUploadedTorrents = true;

$topDirectory = &#39;/tmp/mnt/RT-N16_Disk/&#39;; // Upper available directory. Absolute path with trail slash.
$forbidUserSettings = false;

$scgi_port = 5000;
$scgi_host = "127.0.0.1";

$XMLRPCMountPoint = "/RPC2"; // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!

$pathToExternals = array(
"php" => &#39;/opt/bin/php&#39;, // Something like /usr/bin/php. If empty, will be founded in PATH.
"curl" => &#39;/opt/bin/curl&#39;, // Something like /usr/bin/curl. If empty, will be founded in PATH.
"gzip" => &#39;/bin/gzip&#39;, // Something like /usr/bin/gzip. If empty, will be founded in PATH.
"id" => &#39;/opt/bin/id&#39;, // Something like /usr/bin/id. If empty, will be founded in PATH.
);

// For web->rtorrent link through unix domain socket
// (scgi_local in rtorrent conf file), change variables
// above to something like this:
//
// $scgi_port = 0;
// $scgi_host = "unix:///tmp/rpc.socket";

?>
I did some digging for the first error and found when I run the command:
Code:
sh -c /opt/bin/id -u > /tmp/rutorrent-stats-14784143674c26813380582 ; /opt/bin/id -G >> /tmp/rutorrent-stats-14784143674c26813380582 ; echo /opt/share/www/rtorrent >> /tmp/rutorrent-stats-14784143674c26813380582 ; chmod 0644 /tmp/rutorrent-stats-14784143674c26813380582
I get this in the rutorrent-stats file that looks correct(?):
uid=0(root) gid=0(root) groups=0(root)
0
/opt/share/www/rtorrent
 

dsouvik215

Member
May 25, 2018
896
0
16
i wouldnt' run it as root

that's bad.

as for where your programs are....you will have to find them yourself....but when you do, you would set them in config.php

the latest svn's config also has a place for "stat" which is clearly missing from yours.

try updating to the latest svn version and make sure your paths are correct.
 

shwetha17

Member
May 24, 2018
785
0
16
Quote
i wouldnt' run it as root

that's bad.

as for where your programs are....you will have to find them yourself....but when you do, you would set them in config.php

the latest svn's config also has a place for "stat" which is clearly missing from yours.

try updating to the latest svn version and make sure your paths are correct.

Thanks for the reply, I know where the programs are and they are in the config.php as shown in the 1st post. I also ran each program from the terminal to verify the program.
Unfortunately I need to run as root on my router or the other optware will not function properly. As for the latest SVN copy, I will try that right now.
 

shwetha17

Member
May 24, 2018
785
0
16
I tried the latest SVN copy with the plugins except darkpal and unpack, updated my config.php filling in the info for the five programs. After loading the ruTorrent page I receive these messages in the logger frame.
[26.06.2010 20:22:48] WebUI started.
[26.06.2010 20:22:52] rTorrent's user can't access 'id' program. Some functionality will be unavailable.
[26.06.2010 20:22:52] rTorrent's user can't access 'stat' program. Some functionality will be unavailable.
[26.06.2010 20:22:54] Autotools plugin: rTorrent's user can't access php interpreter. Plugin will not work.
[26.06.2010 20:22:54] Scheduler plugin: rTorrent's user can't access php interpreter. Plugin will not work.
[26.06.2010 20:22:54] Retrackers plugin: rTorrent's user can't access php interpreter. Plugin will not work.
[26.06.2010 20:22:54] RSS plugin: rTorrent's user can't access php interpreter. Plugin will not work.
[26.06.2010 20:22:54] DataDir plugin: rTorrent's user can't access php interpreter. Plugin will not work.
[26.06.2010 20:22:54] Create plugin: rTorrent's user can't access php interpreter. Plugin will not work.
[26.06.2010 20:22:54] Traffic plugin: rTorrent's user can't access php interpreter. Plugin will not work.
[26.06.2010 20:22:54] RSS plugin: rTorrent's user can't access curl program. You will not be able to work with https feeds.
[26.06.2010 20:22:54] Create plugin: Some functionality will be unavailable. rTorrent's user can't access 'pgrep' program.
I looked for pgrep and it is in a accessible folder '/opt/bin/pgrep'

Also here is my $PATH
root@RT-N16:/tmp/home/root# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/home/root:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin:
 

dsouvik215

Member
May 25, 2018
896
0
16
your problem is likely due to having a non-standard install
I can't help you with that. I can only support standard linux, freebsd, or solaris installs. I'm willing to bet something important is messed up

I have a hard timebelieving you have to run as root regardless....either way it's a horrible idea, ESPECIALLY on a router.


someone figured out a vulnerability in rutorrent or xmlrpc-c they gain access to your entire network

not good
 

shwetha17

Member
May 24, 2018
785
0
16
Thank you for your concern about the root issue and I will try again to get non-root to play nicely.

Do you have any suggestions on how to diagnose the problem myself?

P.S. ruTorrent loads and is usable except for the 'id' and now the 'stat' error and those plugins.
 

shwetha17

Member
May 24, 2018
785
0
16
No, it's part of BusyBox v1.16.1 (2010-06-03 16:13:56 EDT) built-in shell (ash)

Here is my list of /bin
Code:
root@RT-N16:/tmp/home/root# ls /bin -ls
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 ash -> busybox
750 -rwxr-xr-x 1 root root 768176 Jun 3 14:01 busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 cat -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 chmod -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 cp -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 date -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 dd -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 df -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 dmesg -> busybox
53 -rwxr-xr-x 1 root root 54156 Jun 3 14:01 eapd
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 echo -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 egrep -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 fgrep -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 fsync -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 grep -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 gunzip -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 gzip -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 kill -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 ln -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 login -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 ls -> busybox
23 -r-x------ 1 root root 23920 Jun 3 14:02 mdu
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 mkdir -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 mknod -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 more -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 mount -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 mv -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 netstat -> busybox
420 -rwxr-xr-x 1 root root 429724 Jun 3 14:02 ntfs-3g
10 -r-x------ 1 root root 9976 Jun 3 14:02 ntpc
0 lrwxrwxrwx 1 root root 4 Jun 3 14:02 ntpstep -> ntpc
0 lrwxrwxrwx 1 root root 4 Jun 3 14:02 ntpsync -> ntpc
30 -r-x------ 1 root root 30736 Jun 3 14:01 nvram
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 pidof -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 ping -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 ps -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 pwd -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 rm -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 rmdir -> busybox
18 -r-x------ 1 root root 18728 Jun 3 14:02 rstats
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 sed -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 sh -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 sleep -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 sync -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 tar -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 touch -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 umount -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 uname -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 usleep -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 vi -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 watch -> busybox
0 lrwxrwxrwx 1 root root 7 Jun 3 14:02 zcat -> busybox
And /opt/bin is too big to post so I will put in a attachment if you wish to look at it.
 

dsouvik215

Member
May 25, 2018
896
0
16
well, just because /bin/sh is a symbolic link to busybox doesn't mean it's truly working like /bin/sh should work

this might be the problem....i'd really need access to your box to try to diagnose this..
and even then i'm not sure i could....what linux are you using again?
 

dsouvik215

Member
May 25, 2018
896
0
16
Quote
BusyBox

BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides minimalist replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete POSIX environment


that's the problem




edit:

oneother thing you might try:

delete the paths in your config.php and make sure the user runnint rtorrent has a proper path variable set up, and also make sure php has the same path variable

This MIGHT help