Webserver user can't access external program

Hello all!

I recently installed FreeBSD on my desktop-machine and so far, it works great. I installed www/apache22 to have a localhost running and net-p2p/rtorrent-devel to a bit of torrenting every now and then. To increase the ease of use, I wanted to use rutorrent to connect to rtorrent via apache.

Well, rutorrent can connect to rtorrent (it shows all the seeded torrents correctly), but it throws the following error messages:

Code:
[02.03.2012 08:46:54] rss: Some functionality will be unavailable. Webserver user can't access external program (curl).
[02.03.2012 08:46:54] rutracker_check: Plugin will not work. Webserver user must have execute access to the rtorrent
 session directory (.rtorrentsession/).
[02.03.2012 08:46:54] autotools: Plugin will not work. rTorrent user can't access external program (php).
[02.03.2012 08:46:54] unpack: Plugin will not work. rTorrent user can't access external program (php).
[02.03.2012 08:46:54] ratio: Some functionality will be unavailable. rTorrent user can't access external program (php).
[02.03.2012 08:46:54] retrackers: Plugin will not work. rTorrent user can't access external program (php).
[02.03.2012 08:46:54] trafic: Plugin will not work. rTorrent user can't access external program (php).
[02.03.2012 08:46:54] create: Plugin will not work. rTorrent user can't access external program (php).
[02.03.2012 08:46:54] rss: Plugin will not work. rTorrent user can't access external program (php).
[02.03.2012 08:46:54] history: Plugin will not work. rTorrent user can't access external program (php).
[02.03.2012 08:46:54] scheduler: Plugin will not work. rTorrent user can't access external program (php).
[02.03.2012 08:46:54] rutracker_check: Plugin will not work. rTorrent user can't access external program (php).
[02.03.2012 08:46:54] screenshots: Plugin will not work. rTorrent user can't access external program (ffmpeg).
[02.03.2012 08:46:54] _task: Some functionality will be unavailable. rTorrent user can't access external program (pgrep).
[02.03.2012 08:46:54] create: Some functionality will be unavailable. rTorrent user can't access external program (pgrep).
[02.03.2012 08:46:54] mediainfo: Plugin will not work. rTorrent user can't access external program (mediainfo).
[02.03.2012 08:46:54] rss: Some functionality will be unavailable. rTorrent user can't access external program (curl).
[02.03.2012 08:46:55] DataDir plugin: rTorrent user can't access php interpreter. Plugin will not work.
[02.03.2012 08:46:55] Unpack plugin: rTorrent user can't access 'unzip' program.
[02.03.2012 08:46:55] Unpack plugin: rTorrent user can't access 'unrar' program.

I asked Google and found the error on the rutorrent-website. It says:

xxx plugin: Plugin will not work. Web-server can't access to external program (program name)​

The mentioned program is required for this plug-in working but is unavailable under web-server user's account. Or this program does not exist at all (and it should be installed), or the path to the program was not included in the environment variable PATH of web-server user (in this case PATH variable should be revised or the plug-in configuration file should be called, usually there is a way to define a path to the program). Another case if the program exists the system but web-server is executed in chroot environment and the program is unavailable to it. This could happen also with various programs when rTorrent's user doesn't have write access to /path/to/rutorrent/share. (reported by crockabiscuit)

The webserver user is defined as follows in the httpd.conf:

Code:
User www
Group www

So it seems that I have to add /usr/local/bin to the PATH of my www-user. But how? Or is there another solution to my problem?

Thanks in advance! :)
 
Post #4 from [thread=7221]this thread[/thread] seems like a nice solution.
 
Wow.. I did not find that thread.. weird. :(

That indeed looks good. I'll confirm solution as soon as I am home again.

Thanks a lot! :)
 
SirDice said:
Post #4 from [thread=7221]this thread[/thread] seems like a nice solution.

Alas, the error stays the same. :(


DutchDaemon said:
As an alternative, you can try net-p2p/rtgui.

No, that's not really an alternative, because it seems to lack the feature to determine the folder whererin the downloaded stuff should be saved. Or am I missing something? (O, and it throws some minor errors as well :p )
 
rtgui can do that indeed. If you click on a torrent and choose the Storage tab, you can change where it should download the file.
 
Oh, that's good news. I didn't see it. But it throws some errors which prevent me from testing it:

Code:
Warning: disk_total_space() [function.disk-total-space]: No such file or directory in /usr/local/www/rtgui/index.php on line 93

Warning: Division by zero in /usr/local/www/rtgui/index.php on line 93

Warning: disk_total_space() [function.disk-total-space]: No such file or directory in /usr/local/www/rtgui/index.php on line 94

Warning: disk_total_space() [function.disk-total-space]: No such file or directory in /usr/local/www/rtgui/index.php on line 94

Warning: Division by zero in /usr/local/www/rtgui/index.php on line 94
Disk Free: / (0%)


Line 93 and 94 of index.php read:

PHP:
echo "</div>\n";
}

I can't really find something useful via Google. And I'd rather continue using rutorrent, because I'm pretty used to it by now. But well.. ;)

I don't have time to look into the issue tonight, but maybe someone else knows how to make rutorrent able to use curl and php.

Thanks anyway! :)
 
Back
Top