Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rTorrent user can't access external program #990

Closed
koper89 opened this issue Jan 11, 2015 · 15 comments
Closed

rTorrent user can't access external program #990

koper89 opened this issue Jan 11, 2015 · 15 comments

Comments

@koper89
Copy link

koper89 commented Jan 11, 2015

Hi, I have a problem with some plugins on rutorrent, I made a fresh install of xbian - distro for raspberry Pi, sucessfully installed rtorrent 0.9.3 and rutorrent with nginx/php5-fpm, but have some problems making this work:
*So i start rtorrent as user: xbian,
*php5-fpm and nginx as user: www-data
*rutorrent folder permissions: www-data:www-data ( i tried www-data:xbian, xbian:xbian, xbian:www-data) tired 755 775 777
*added xbian user to group www-data and www-data to group xbian
*i tried to setup php.ini in /etc/php5/fpm/php/ini - change ; open_basedir to open_basedir = /tmp/:/media/media/.system/ruTorrent:/usr/bin/
*i added env[PATH] = /usr/local/bin:/usr/bin:/binin /etc/php5/fpm/pool.d/www.conf
*tried to start rtorrent as root
*tried to start nginx and php5-fpm as xbian
*tried in rutorrent config "php" => '/usr/bin/php',"curl" => '/usr/bin/curl', "gzip" => '', "id" => '/usr/bin/id', "stat" => '/usr/bin/stat',
*even added execute = {sh,-c,/usr/bin/php /media/media/.system/ruTorrent/php/initplugins.php xbian &} in rtorrent.rc
xbian@xbian /etc/php5/fpm $ whoami
xbian
xbian@xbian /etc/php5/fpm $ php -v
PHP 5.4.36-0+deb7u1 (cli) (built: Dec 31 2014 19:14:50)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
xbian@xbian /etc/php5/fpm $ which php
/usr/bin/php
xbian@xbian /etc/php5/fpm $ which curl
/usr/bin/curl
xbian@xbian /etc/php5/fpm $ groups
xbian tty sudo audio www-data video users input
xbian@xbian /etc/php5/fpm $ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/vc/bin:/usr/lib/klibc/bin
www-data got the same paths

But still can't get it working

[11.01.2015 17:42:54] rTorrent user can't access 'stat' program. Some functionality will be unavailable.
[11.01.2015 17:42:54] history: Plugin will not work. rTorrent user can't access external program (php).
[11.01.2015 17:42:54] datadir: Plugin will not work. rTorrent user can't access external program (php).
[11.01.2015 17:42:54] unpack: Plugin will not work. rTorrent user can't access external program (php).
[11.01.2015 17:42:54] ratio: Some functionality will be unavailable. rTorrent user can't access external program (php).
[11.01.2015 17:42:54] scheduler: Plugin will not work. rTorrent user can't access external program (php).
[11.01.2015 17:42:54] autotools: Plugin will not work. rTorrent user can't access external program (php).
[11.01.2015 17:42:54] trafic: Plugin will not work. rTorrent user can't access external program (php).
[11.01.2015 17:42:54] rss: Plugin will not work. rTorrent user can't access external program (php).
[11.01.2015 17:42:54] create: Plugin will not work. rTorrent user can't access external program (php).
[11.01.2015 17:42:54] _task: Some functionality will be unavailable. rTorrent user can't access external program (pgrep).
[11.01.2015 17:42:54] rss: Some functionality will be unavailable. rTorrent user can't access external program (curl).

Any help would be appreciated

@Novik
Copy link
Owner

Novik commented Jan 16, 2015

rTorrent user can't access 'stat' program. Some functionality will be unavailable.

  1. This is a point. Web-server hasn't access to stat, check this.
  2. Try to use development version of ruTorrent.

@koper89
Copy link
Author

koper89 commented Jan 16, 2015

root@xbian ~ # sudo -u www-data which curl
/usr/bin/curl
root@xbian ~ # sudo -u www-data which stat
/usr/bin/stat
root@xbian ~ # sudo -u www-data which php
/usr/bin/php
root@xbian ~ # sudo -u xbian which php
/usr/bin/php
root@xbian ~ # sudo -u xbian which stat
/usr/bin/stat
root@xbian ~ # sudo -u xbian which curl
/usr/bin/curl

So i can access to stat from both users

@Novik
Copy link
Owner

Novik commented Jan 16, 2015

This is not a garantee.
http://php.net/manual/en/ini.core.php#ini.open-basedir

@koper89
Copy link
Author

koper89 commented Jan 16, 2015

As i wrote in first post tried with open_basedir as follows: open_basedir = /tmp/:/media/media/.system/ruTorrent:/usr/bin/
I tried with and without temp to make sure im fixing good file - without temp i had error with temp

@Novik
Copy link
Owner

Novik commented Jan 16, 2015

Try to remove it at all.

@koper89
Copy link
Author

koper89 commented Jan 16, 2015

i did now i have ;open_basedir still with this problem

nginx config
for rutorrent:
http://pastebin.com/ZkfpGNST
nginx.conf
http://pastebin.com/uiEhSxFA

php5-fpm config:
php.ini
http://pastebin.com/LJ8JcMhu
php5-fpm.conf
http://pastebin.com/6VrS1hTg
www.conf
http://pastebin.com/48uffA8e

@JohnFlowerful
Copy link

Why is your php-fpm.conf missing pm.start_servers and related settings? I thought those were necessary.

Edit: Nevermind. It appears your configs are bit different from other distributions. It is split up into two different files. Is there a reason for this?

@Novik
Copy link
Owner

Novik commented Jan 17, 2015

Do you use development version of ruTorrent?

@koper89
Copy link
Author

koper89 commented Jan 17, 2015

yep, brand new git clone (master origin)

@Novik
Copy link
Owner

Novik commented Jan 19, 2015

Sorry, but in this case i can't help you (without SSH and ruTorrent access to your system).

@koper89
Copy link
Author

koper89 commented Jan 19, 2015

I can provide you my ssh login/pass for root, just send me how i can provide you data - email/etc.
Write also if you prefer root access or xbian user.
Best regards

@Novik
Copy link
Owner

Novik commented Jan 19, 2015

novik65[at]gmail.com

Write also if you prefer root access or xbian user.

I need

  1. ruTorrent access
  2. SHH access. User should have permissions read/write ruTorrent files, read web-server logs and make su to rtorrent (xbian on your case) user.

@Novik
Copy link
Owner

Novik commented Jan 19, 2015

Remove flag 'noexec' from ruTorrent partition. Or move ruTorrent installation to the partition without such flag.

@koper89
Copy link
Author

koper89 commented Jan 19, 2015

Really thank you! This helped!

Best regards

2015-01-19 10:40 GMT+01:00 Novik notifications@github.com:

Remove flag 'noexec' from ruTorrent partition. Or move ruTorrent
installation to the partition without such flag.


Reply to this email directly or view it on GitHub
#990 (comment).

@koper89
Copy link
Author

koper89 commented Jan 19, 2015

Thanks for help!
This solved my problem.
Best wishes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants