xwmario / rutorrent

Automatically exported from code.google.com/p/rutorrent
0 stars 0 forks source link

rTorrent user can't access 'id' program. Some functionality will be unavailable. #857

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
rTorrent user can't access 'id' program. Some functionality will be unavailable.

What environment are you using?
1. My ruTorrent version is 3.5 (===> but where to see it?)
2. My rTorrent version is 0.9.2/0.13.2
3. I use web-server nginx 1.2.6 on Ubuntu 13.04
4. I use browser FireFox on Windows

Are some errors present in the web-server log?
Searching for the term id in the error.log resp. access-log does not reveal 
anything specific...

Are some errors present in the browser error console?

No

Please provide any additional information below.
The above error is the ONLY error notification I get. I am able to load all 
plugins. i.e. the config.php and the paths are set properly. The user can run 
the command 'id' and I see in /tmp/ several files from ruTorrent with content:

1001
1004
/home/rtorrent

When I run id I get:

rtorrent@arm:/home$ id
uid=1001(rtorrent) gid=1004(rtorrent-nginx) groups=1004(rtorrent-nginx)

So I have no real clue what to check more, especially since everything else 
works.

Original issue reported on code.google.com by leo.ze...@gmail.com on 30 Sep 2013 at 12:14

GoogleCodeExporter commented 8 years ago
>My ruTorrent version is 3.5 (===> but where to see it?)

In the browser title, may be?

>When I run id I get:

Web-server and rtorrent users must use the same tmp directory. Check this.

Original comment by novik65 on 30 Sep 2013 at 4:38

GoogleCodeExporter commented 8 years ago
Thx for the hint with the version. The browser title looks like enclosed and 
Firefox 18.0 has no real title-frame where it is displayed. I would have 
expected like in any other program in the About.

Reg. the id:

I'll check the tmp-dir of my web-server cause I have for the very moment no 
clue how to figure that out for nginx. Thx for the hint cause with the 
error-message I wouldn't concluded that kind of root-cause.

I personally wonder why this Error-mesage is not in the FAQ. i.e. 'Error 
message:  rTorrent user can't access 'id' program. Some functionality will be 
unavailable. ==> check the tmp dirs' I mean Googleing for the other 'curl' and 
'stat' brings a plenty of results, but no specific clue to check the config.php 
resp. to check in /etc/php5/fpm/php.ini the open_basedir. I took me some while 
to figure that out. So, my request is to add the few message to the FAQ-section.

ANYWAY, I'll try to figure out the details and let you know...

Original comment by leo.ze...@gmail.com on 30 Sep 2013 at 6:40

Attachments:

GoogleCodeExporter commented 8 years ago
>The browser title looks like enclosed and Firefox 18.0 has no real title-frame 
where it is displayed.

Try to move mouse over the corresponding tab. And you will see a hint.

>I'll check the tmp-dir of my web-server cause I have for the very moment no 
clue how to figure that out for nginx. 

Sorry, but i can't understand - this resolve your problem, or not? If not - 
check .service file for nginx (inside /etc/systemd/system) and set
[Service]
PrivateTmp=false

>I personally wonder why this Error-mesage is not in the FAQ.

I personally wonder too. My English isn't good for writing something like this. 
And english-speaking commiters of the project, for unknown for me reason, 
doesn't want to spend his time for modifying projects wiki.

Original comment by novik65 on 1 Oct 2013 at 7:33

GoogleCodeExporter commented 8 years ago
Thx, for the version hint. This works. As mentioned, I would have expected it 
in the About-dialog as well.

tmp-dirs: Your hint works only for Apache. In /etc/nginx/sites-available/ I can 
set in my rutorrent-file 

client_body_temp_path /tmp;

But what means: '...rtorrent users must use the same tmp directory'? Where 
should be a tmp-dir be located for the rtorrent-user? Hm? How are they both 
related to each other? AND also what kind of tmp-dirs? (client-body, scgi, 
fastcgi, uwsgi, ...)

FAQ: I can try to fumble some text and check if I could provide something. But 
don't take this as granted. I think about it...

Original comment by leo.ze...@gmail.com on 1 Oct 2013 at 9:35

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago

>what means: '...rtorrent users must use the same tmp directory'?

This means: if rtorrent create file on the /tmp, then web-server must find it 
on the /tmp. Read this - http://danwalsh.livejournal.com/51459.html for 
details, for example.

>also what kind of tmp-dirs? (client-body, scgi, fastcgi, uwsgi, ...)

This is your system and your server, right? I doesn't know anything about its.

Original comment by novik65 on 1 Oct 2013 at 10:11

GoogleCodeExporter commented 8 years ago
With your last comment I had an idea how to solve it. I finally solved the 
problem with:

grep rutorrent-stats /var/log/nginx/error.log

==> 

2013/09/29 20:10:05 [error] 1709#0: *5 FastCGI sent in stderr: "PHP message: 
PHP Warning:  file(): open_basedir restriction in effect. 
File(/tmp/rutorrent-stats-213127733552486cf864528) is not within the allowed 
path(s): 
(/usr/share/nginx/html/rutorrent/conf/:/usr/share/nginx/html/rutorrent/php:/usr/
share/nginx/html/rutorrent/:/home/rtorrent/) in 
/home/rtorrent/rutorrent/rutorrent/php/settings.php on line 197

==> so, the conclusion is to include in the var open_basedir 
(/etc/php5/fpm/php.ini) the /tmp/ and then it works, without a failure.

I added the content here just for the sake of future questions. I personally 
guess, the same approach might work in Apache - but cannot test, since I have 
no Apache running....

(You could close this ticket - thx for your support)

Original comment by leo.ze...@gmail.com on 1 Oct 2013 at 12:14

GoogleCodeExporter commented 8 years ago

Original comment by novik65 on 1 Oct 2013 at 12:34