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

Rutorrent and DSM6 compatibility #2215

Closed
iglooenergyreferral opened this issue Mar 27, 2016 · 25 comments · Fixed by #4234
Closed

Rutorrent and DSM6 compatibility #2215

iglooenergyreferral opened this issue Mar 27, 2016 · 25 comments · Fixed by #4234
Labels

Comments

@iglooenergyreferral
Copy link

Hi,

I seem to be having these issues when seeting up rutorrent, can anyone help?

[27.03.2016 05:42:19] WebUI started.
[27.03.2016 05:42:22] rTorrent user must have read/execute access to the tmp directory. ruTorrent will not work. (/var/services/tmp/)
[27.03.2016 05:42:22] rss: Some functionality will be unavailable. Webserver user can't access external program (curl).
[27.03.2016 05:42:22] rutracker_check: Plugin will not work. Webserver user must have execute access to the rtorrent session directory (/usr/local/rutorrent/var/.session/).
[27.03.2016 05:42:23] Unpack plugin: rTorrent user can't access 'unzip' program.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Dr-Bean
Copy link
Contributor

Dr-Bean commented Apr 7, 2016

Does WM6 in the title actually mean DSM6 by any chance?

@iglooenergyreferral
Copy link
Author

Hi Dr Mean,

I wrote the article when I was quite tired, I meant DSM6 yes

On Thu, 7 Apr 2016 at 19:49, Dr-Bean notifications@github.com wrote:

Does WM6 in the title actually mean DSM6 by any chance?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#2215 (comment)

@Dr-Bean Dr-Bean changed the title Setting up rutorrent WM6 Setting up rutorrent DSM6 Apr 7, 2016
@Dr-Bean Dr-Bean changed the title Setting up rutorrent DSM6 Rutorrent and DSM6 compatibility Apr 7, 2016
@Dr-Bean Dr-Bean added the dsm 6 label Apr 7, 2016
@nex6
Copy link

nex6 commented Apr 14, 2016

Model and arch of your NAS. DS415Play - evansport x15

DSM version; 6.0-7321 Update 1 2016/04/14

Provide log files if available: No log files available

If the package doesn't start, try to start the package via the command line and provide the output:"Starting ruTorrent ..." Checking status directly after generates: "ruTorrent is not running"

Have had some problems with SSH service not possible to start so I re-installed DSM today, installed Webstation and then directly tried to install ruTorrent from the Synocommunity package, after installation package will not run, is doing something for a couple of seconds and then stopped again. Everything else working as it should.

First try to start manually, I got an error "unknown user rutorrent" so I created a rutorrent user and when trying again I get message "Starting ruTorrent ..." but nothing happens..

Would really appreciate some assistance, not a complete n00b but pretty close :)

@mal68
Copy link

mal68 commented May 8, 2016

Hey

So I have been trying to track this issue as I would like to update my DS415+ to 6.0 but I don't want to do it unless this package will work. I thought I read somewhere the other day that the tool chains have been released, is this true? If so does that get us closer to a working package for DSM 6.0?

@dolphinkite
Copy link

ruTorrent works on my DS415+ under DSM6.0

@dancingnzb
Copy link

dancingnzb commented Jun 9, 2016

Hey guys, I'm on ds1815+ DSM 6.0.1.7393,

I installed rutorrent beta and webserver but i keep getting those errors.:

08.06.2016 22:33:20] WebUI started.
[08.06.2016 22:33:20] Webserver user doesn't have read/write/execute access to the tmp directory. ruTorrent will not work. (/usr/local/rutorrent/tmp)
[08.06.2016 22:33:20] rTorrent user must have read/execute access to the tmp directory. ruTorrent will not work. (/usr/local/rutorrent/tmp)
[08.06.2016 22:33:20] rss: Some functionality will be unavailable. Webserver user can't access external program (curl).
[08.06.2016 22:33:20] rutracker_check: Plugin will not work. Webserver user must have execute access to the rtorrent session directory (/usr/local/rutorrent/var/.session/).
[08.06.2016 22:33:30] Source torrent file for this download not found.

Please can you tell me what I do to fix it ?

thanks a million

@davidcafor
Copy link

Tried to install ruTorrent 3.7-8 Beta from SynoCommunity on my Synology DS216Play with DSM DSM 6.0.1-7393 Update 1 and it doesn't work. I'm getting the same error:

[12.07.2016 16:31:47] WebUI started. [12.07.2016 16:31:48] El usuario del servidor web no tiene permisos de lectura/escritura/ejecución al directorio tmp. ruTorrent no funcionará. (/usr/local/rutorrent/tmp) [12.07.2016 16:31:48] El Webserver no puede acceder al programa 'stat'. Algunas funcionalidades no estarán disponibles. [12.07.2016 16:31:48] El usuario de rTorrent debe tener permisos de lectura/escritura/ejecución al directorio tmp. ruTorrent no funcionará. (/usr/local/rutorrent/tmp) [12.07.2016 16:31:48] rss: Algunas funcionalidades no estarán disponibles. El Webserver no puede acceder al programa externo (curl). [12.07.2016 16:31:48] rutracker_check: El Plugin no funcionará. El Webserver debe poder ejecutar dentro de la carpeta de sesión (/usr/local/rutorrent/var/.session/).

Tried to manually change permissions for this folders, but it doesn't take effect.

Have you planned to fix that? or is there something that we could do to make it works?

Thanks.

@dancingnzb
Copy link

hey davidcafor, i was able to fix it, give me your skype and i will tell you,

@davidcafor
Copy link

Skype: davidcafor_cd

Thanks so much

@Dezzmondo
Copy link

hi, could you please let me know the fix too? I have tried several answers but no luck so far :( Thanks

skype: dezzmondo

@davidcafor
Copy link

I didn't get any fix yet. Waiting for dancingnzb solution :D

@pudgetta
Copy link

pudgetta commented Nov 7, 2016

Hello, same problem on DS215+
DSM 6.0.2-8451 Update 2
Rtorrent starts but gives same errors :
07.11.2016 08:39:53] WebUI started.
[07.11.2016 08:39:54] Webserver user doesn't have read/write/execute access to the tmp directory. ruTorrent will not work. (/usr/local/rutorrent/tmp)
[07.11.2016 08:39:54] Webserver user can't access 'stat' program. Some functionality will be unavailable.
[07.11.2016 08:39:54] rTorrent user must have read/execute access to the tmp directory. ruTorrent will not work. (/usr/local/rutorrent/tmp)
[07.11.2016 08:39:54] rss: Some functionality will be unavailable. Webserver user can't access external program (curl).
[07.11.2016 08:39:54] rutracker_check: Plugin will not work. Webserver user must have execute access to the rtorrent session directory (/usr/local/rutorrent/var/.session/).

Any fix for this?

@slicepaperwords
Copy link

Hi, had the same problem on RS816
Found a fix that is working for me.
Add this to your open_basedir in Webstation config:
/usr/local/rutorrent:/usr/bin
And restart Webstation, no more errors.

@backupking
Copy link

hi done all that all I get is error 403 on webpage any reason why I had to set sonar and jacket inside docker for them to work

this is the same on my
214+
or ds3615xs

thanks

backupking

@A----
Copy link

A---- commented Jan 8, 2017

One thing that should be mentioned somewhere is that Web Station has to be installed prior to ruTorrent. It makes a mess in /var/services/web.

I do have exec stat issues at the moment though, even with @slicepaperwords fix.

@A----
Copy link

A---- commented Jan 8, 2017

OK, so a test.php in /volume1/web/rutorrent with:

<?php

system('stat --help');

works when displayed in a webpage or run as http.

Function ruTorrent uses is in php/util.php (findEXE(…)).

If you try:

<?php

require_once('php/util.php');

var_dump(findEXE('stat'));

No dice. If you debug that function, you can see that the PATH is actually empty. (you can also try to print php -i).
I think that this is because I'm using nginx/php-fpm. Conf files/paths are a clusterfuck. If you run sudo -u http php -i | grep -i -A20 env, you can see that PATH is correctly set in a terminal.

So, I dumped a phpinfo, checked all INI files, looked a bit around. I modify if not all, at least most files named *fpm*. Finally found that WebStation uses this file /usr/syno/etc/packages/WebStation/php56/fpm.conf for its FPM conf but wait! That couldn't be that simple noooo. This file is rewritten every time the Webstation service is restarted so some grep/find later, I edited /volume1/@appstore/WebStation/misc/php56_fpm.mustache because at least they use templates and bam:

  1. edit this file
  2. add env[PATH] = /sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin to the www (global) FPM pool
  3. restart your Webstation

Annnnnnd you do not have the warning about stat.

@Dr-Bean
Copy link
Contributor

Dr-Bean commented Jan 9, 2017

One thing that should be mentioned somewhere is that Web Station has to be installed prior to ruTorrent

That's a change since DSM6, when Synology started publishing WebStation as a separate package. Package Center will handle it if you add a spk/rutorrent/src/conf/PKG_DEPS file to the package, like this: https://github.com/SynoCommunity/spksrc/blob/master/spk/cops/src/conf/PKG_DEPS.
Feel free to open a PR to add it (although the other issues should be solved as well, before we can say the package is DSM6 compatible...)

Nice work otherwise, although I don't think we can package the changes to the .mustache file. Editing files like that have a habit of breaking whenever Synology decides to update the WebStation package. Maybe there's a supported way to add user-defined settings, similar to e.g. COPS?

@A----
Copy link

A---- commented Jan 9, 2017

Yeah, mustache template will be ovewritten everytime Web Station is reinstalled.
There's no way to dump a file in a "fpm.d". At first I though that it used /usr/local/etc/php56/php-fpm.conf, hence including /usr/local/etc/php56/fpm.d/* but it does not and there's no include directive in the mustache template. I don't believe that there's a pretty way of doing this, but I might be wrong.

It has to be noted that there also is a php70 folder and template, if you choose it for a backend. I did not try, so I don't know if ruTorrent works with it, but that means two files to be modified.

There might be another approach that I haven't fully tried, by changing config $pathToExternal in /usr/local/rutorrent/share/rutorrent/conf/config.php. I believe might have their own path to config to be changed.

One last thing would be to patch php/util.php itself, since:

/usr/local/rutorrent/share/rutorrent$ grep -R 'getenv' .
./php/util.php: $path = explode(":", getenv('PATH'));

Another thing is that I'm pretty sure that the open_basedir is now doing more harm than good (https://github.com/SynoCommunity/spksrc/blob/master/spk/rutorrent/src/installer.sh#L106). I think that this file is not read by Web Station as I had to configure it for rutorrent to work.
Also: cannot access /etc/php/conf.d: No such file or directory
And: cannot access /usr/syno/etc/sites-enabled-user: No such file or directory ( https://github.com/SynoCommunity/spksrc/blob/master/spk/rutorrent/src/installer.sh#L76 )

I'll PR a PRK_DEPS.

@Dr-Bean
Copy link
Contributor

Dr-Bean commented Jan 9, 2017

Synology made significant changes to the whole WebStation/PHP/directory setup/file locations with the introduction of DSM6. So yes, I would expect multiple changes are necessary to get the package to work on DSM6, but keep in mind that we don't want to break DSM5 (or earlier) support either.
I think COPS contains most of the path changes currently. Take a look at the recent changes to the installer and dsm-control files.

@A----
Copy link

A---- commented Jan 9, 2017

I don't think cops has the right paths.
Custom open_basedir confs are mustachized and placed there:

$ realpath /usr/syno/etc/packages/WebStation/php56/conf.d/user_settings.ini
/usr/syno/etc/packages/WebStation/php56/conf.d/user_settings.ini

I don't have the phpinfo at the moment, so I can't confirm.

@Dr-Bean
Copy link
Contributor

Dr-Bean commented Jan 9, 2017

See Synology's developers guide, paths are mentioned in there. Although the release of php7 may have changed things again, I haven't checked yet. For the record, phpMyAdmin does the same thing.

@jpmurray
Copy link

Checking here, has anyone made any development?

On a DS214Play here, curently running DSM 6.1.3-15152 Update 8. Just did a fresh install of ruTorrent for the first time, and webgui works perfectly fine, although its log tab shows:

[14.11.2017 09:24:29] WebUI started.
[14.11.2017 09:24:29] No connection to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file.

In the package center, ruTorrent is shown as stopped and its logs are empty.

@MichiDe
Copy link

MichiDe commented Feb 21, 2018

Same issue on a DS1513+ it worked perfect and now just stopped no updates applied

@Safihre
Copy link
Contributor

Safihre commented Feb 26, 2018

I worked on DSM6 compatibility but got stuck, I did the basic work but need some help to figure out the right paths to config files etc. If you want, you can help me here: #3175.

@th0ma7
Copy link
Contributor

th0ma7 commented Dec 5, 2020

New and update to rutorrent version 3.10 uploaded on https://synocommunity.com/package/rutorrent

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

Successfully merging a pull request may close this issue.