rTorrent + ruTorrent guide

simur612

Member
May 25, 2018
879
0
16
Code:
rss: Some functionality will be unavailable. rTorrent user can't access external program (curl).Getting error loading feed every time it updates but feeds load regardless.
Have installed curl and php5 and set all the permissions.
Take a look at https://code.google.com/p/rutorrent/wiki/ErrorMessages
But are you saying that everything is working fine but you still get an error?
do you think it is possible to use this script to install Rtorrent and Rutorrent on a Seagate 4 NAS?
Don't know but probably yes, try and see

If it is possible how should I copy the sh file to the NAS 4 and than run the script?
Are you serious? How do you otherwise copy files to the NAS? Just do it that way and see http://forums.rutorrent.org/index.php?topic=4665.msg14497#msg14497 if you're going to use a Windows text editor to create the file

Would be awesome if someone can help me to fix this issue.
You already asked me this via PM...

You should create a dir which rTorrent will use to save data about the current session. And as I said via PM, open the god damn .rtorrent.rc file and try to understand what's in it, it even has comments which explain everything. In that file you'll see a line which sets the session dir and and since the specified directory doesn't exist, it doesn't work.
 

simur612

Member
May 25, 2018
879
0
16
You already asked me this via PM...

You should create a dir which rTorrent will use to save data about the current session. And as I said via PM, open the god damn .rtorrent.rc file and try to understand what's in it, it even has comments which explain everything. In that file you'll see a line which sets the session dir and and since the specified directory doesn't exist, it doesn't work.
The problem is that i have installe rTorrent twice. I got one in home folder/downloads/rtorrent but it is version 0.9.0

But the version in your script is 0.9.4 I can not find where it has been installted. The .rtorrent.rc I found twice.

Code:
~# find / -name rtorrent.rc
/usr/share/doc/rtorrent/doc/rtorrent.rc
/root/Downloads/rtorrent-0.9.0/doc/rtorrent.rc
I think the /usr/share/doc/rtorrent/doc/rtorrent.rc one is the script version.

In the rtorrent.rc the session = ./session


My problem is that I first followed another tutorial and now i get mixed up. I think the best is if i uninstall everything with rtorrent and run the script again.

What do you think? Is there a chance to fix my issue without re-installing?
 

randac56

Member
May 25, 2018
915
0
16
The problem is that i have installe rTorrent twice. I got one in home folder/downloads/rtorrent but it is version 0.9.0
Has nothing to do with your problem, just ignore it
The .rtorrent.rc I found twice.
No you didn't but ignore/forget about all that
at do you think? Is there a chance to fix my issue without re-installing?
Yes but seems it's extremely difficult to explain anything to you...
Open the ~/.rtorrent.rc file (exactly and only that specific file!!!!)
read the damn comments and edit lines such as "session=..." to match your setup
for example, I have a folder in my home dir named "Torrents" with inside it a folder for the current rTorrent session named ".session" so for me the line looks like "session = ~/Torrents/.session"
I'll say it again, open the ~/.rtorrent.rc file, read the damn comments and try to understand it!!!!! Then edit the relevant lines and save it. The "#" in front of some lines indicates a comment so remove it for lines which should do something (make sure the "session=..." doesn't start with a "#" for example)
A few lines which you'll most likely want to edit: session, directory, upload_rate, download_rate, port_range and probably a few others to
Also, read the section "Using rTorrent with screen" in the initial post of this thread - you will want to use that to
 

peshua19

Member
May 25, 2018
897
0
16
I'm stuck.
Something wrong with the Group.

the error was:

Please specify a valid website group owner.
Exiting with status code 1.

the default www-data didn't work.
I tried "Administrators" and it didn't work too.
Should I create a group and user under my NAS settings or it is specific to the Linux enviroment?
 

lisas4567

Member
May 25, 2018
773
0
16
I'm stuck.
Something wrong with the Group.

the error was:

Please specify a valid website group owner.
Exiting with status code 1.

the default www-data didn't work.
I tried "Administrators" and it didn't work too.
Should I create a group and user under my NAS settings or it is specific to the Linux enviroment?
No, don't create a new user or group. You will have to find out the webserver's run user and group and use that.
On a standard system with Apache the following command can be used to find those:
Code:
grep -E "USER|GROUP" /etc/apache2/envvarsYou could also check as which user the webserver runs and then check which groups the user is part of. For apache you could do it like this:
Code:
ps aux | grep apache
groups <webserver-user>and replace <webserver-user> with the user which you found out with the first command

I don't know anything about Seagate NAS OS 4 though so I can't give you any specific help
 

saroos1

Member
May 25, 2018
718
0
16
We are assuming the NAS OS already has Apache installed. Could be another webserver and not Apache and it could cause this issue?

I think I'll need to verify Apache installation and maybe install it first if not present. If it is another kind of web server should I use the same command to find the group and user but change "Apache" for its native web server?
 

simur612

Member
May 25, 2018
879
0
16
We are assuming the NAS OS already has Apache installed. Could be another webserver and not Apache and it could cause this issue?

I think I'll need to verify Apache installation and maybe install it first if not present. If it is another kind of web server should I use the same command to find the group and user but change "Apache" for its native web server?
I've modified the script so that if the "APACHE" flag is set (it is by default), Apache will be installed first and after that, it will check for a valid user and group website owner
try to run the new script
 

randac56

Member
May 25, 2018
915
0
16
kabeleon, thank you so much smiley.gif

It is finally running, i did exactly how you said. I am sorry i know its extreme difficault to understand everything. The beginning is hard cheesy.gif

Downloading / seeding works. And i also can download the files in Filezilla which are downloaded in webUI

But i have 1 more ERROR in my webUI

Code:
[12.11.2014 18:06:58] WebUI started.
[12.11.2014 18:06:58] rutracker_check: Plugin will not work. Webserver user must have execute access to the rtorrent session directory (/root/Torrents/.session/).
I think it looks like that my "Torrents" folder has no read/write rights. I checked this forum and found someone had same issue like i do but the following command didnt fix the issue:

Code:
~# sudo chmod -R 777 ~/Torrents
I also checked in filezilla and The Torrents and its subfolders got all rights. 777
 

Attachments

lisas4567

Member
May 25, 2018
773
0
16
kabeleon, thank you so much


It is finally running, i did exactly how you said. I am sorry i know its extreme difficault to understand everything. The beginning is hard cheesy.gif

Downloading / seeding works. And i also can download the files in Filezilla which are downloaded in webUI
Glad to see you got it to work

Code:
[12.11.2014 18:06:58] WebUI started.
[12.11.2014 18:06:58] rutracker_check: Plugin will not work. Webserver user must have execute access to the rtorrent session directory (/root/Torrents/.session/).
I think it looks like that my "Torrents" folder has no read/write rights. I checked this forum and found someone had same issue like i do but the following command didnt fix the issue:

Code:
~# sudo chmod -R 777 ~/Torrents
I also checked in filezilla and The Torrents and its subfolders got all rights. 777
It seems that you are running rTorrent as root, you shouldn't do that. As for the error, it doesn't really matter but it's pretty strange that you are getting that error. It's probably a bug in the code of the plugin because as root, you always have permission and with the "chmod -R 777" instruction you have given all users full permissions to that dir + all subdirs. I recommend you to just disable the plugin (simplest way is right-clicking it in the "Plugins" tab in ruTorrent and then "Launch" > "Disable").
 

Attachments

peshua19

Member
May 25, 2018
897
0
16
when i connect to SSH i am logged in as root.

But I also created a user for xRDP.

I started rtorrent with your suggested command:

Code:
screen -S rtorrent -d -m rtorrent
My edited rtorrent.rc: http://pastebin.com/CtzgByJs

The very strange thing is, when I go to Delete and --> Delete files in webUI it delete the files (i can see it in filezilla).

So why I can delete files in webUI but not download it via webUI. That makes no sense to me.

When i go to data and get file ERROR: [12.11.2014 22:14:36] Webserver user can't access the data of this torrent.

I am not able to right-click the Plugins in webUI. It does not happen anything if I do. If i left click it it appears: "URL Replacement in RSS" and "Ratio Rules"


I would love if you may have any other idea how i could fix this issue. The "Get file" function is pretty useful for me. Because I need also the Create torrent function.


filezilla screen:

g73zm3dflr7.gif
 

simur612

Member
May 25, 2018
879
0
16
when i connect to SSH i am logged in as root.
You shouldn't do that. You should log in as a "normal" user and use commands such as "sudo" or "su" when you temporary need root permissions.
btw, root has permission to do ANYTHING! That's also the reason why it's unsafe and why you shouldn't always use root
So why I can delete files in webUI but not download it via webUI. That makes no sense to me.
I have no idea what you're saying, what do you mean by "download it via webUI"?
When i go to data and get file
again, I have no idea what you're saying
I am not able to right-click the Plugins in webUI. It does not happen anything if I do. If i left click it it appears: "URL Replacement in RSS" and "Ratio Rules"
on what are you clicking? when I told you you could disable the plugin via ruTorrent, I meant you should do: http://i.imgur.com/eSYQvC8.png
The "Get file" function is pretty useful for me. Because I need also the Create torrent function.
I have no idea what this "Get file" function you're talking about is
 

saroos1

Member
May 25, 2018
718
0
16
Ok i got your point about not logging in with root all time.

oh i now found the plugin thing, i was looking on plugins on top.

With download via webUI i mean this:

ERROR message: [12.11.2014 22:52:52] Webserver user can't access the data of this torrent.

3ladqfim4x74.gif

I sadly also cannot create a torrent. I am not able to choose a list like in Filezilla:
 

Attachments

simur612

Member
May 25, 2018
879
0
16
Thanks Kabeleon,

it seems that Apache is not installed but now it is stuck on another issue.
from the log result Aptitude is not installed either.

"redtorrent.sh: eval: line 1: aptitude: not found

Exiting with status code 127."

I spent some time reading about it. Do you think it is possible to install one package from https://packages.debian.org/search?keywords=aptitude?
Or there is another installer that I could try to use? Maybe replacing the commands in the script.
 

randac56

Member
May 25, 2018
915
0
16
ERROR message: [12.11.2014 22:52:52] Webserver user can't access the data of this torrent.
...
I sadly also cannot create a torrent. I am not able to choose a list like in Filezilla:
...​
all that is because you told the install script to install everything to root and the webserver-user (www-data) doesn't have any permissions on root's dirs
you should run the script again and pass A "NORMAL" USER as an argument instead of root
also, I am not here to teach you Linux, Debian or whatever. do some effort to learn the basics yourself, that's also how I learned it

"redtorrent.sh: eval: line 1: aptitude: not found

Exiting with status code 127."

I spent some time reading about it. Do you think it is possible to install one package from https://packages.debian.org/search?keywords=aptitude?
Or there is another installer that I could try to use? Maybe replacing the commands in the script.​
You could install aptitude or just change the relevant flag in the script to use another package management tool instead. Example for apt-get (which you probably do have): "PINSTALL = apt-get -y install"
 

lisas4567

Member
May 25, 2018
773
0
16
You could install aptitude or just change the relevant flag in the script to use another package management tool instead. Example for apt-get (which you probably do have): "PINSTALL = apt-get -y install"
Unfortunately I don't have apt-get either.
I run the command compgen -c to list all commands available and here is the list:

http://pastebin.com/6EL5BDcY

from my reading I can't install aptitude without apt-get, am I right?

I tried to find help on Lacie forums and people are running full debian on those machines but until now Nas4 got no love from the community.
 

saroos1

Member
May 25, 2018
718
0
16
from my reading I can't install aptitude without apt-get, am I right?
aptitude is a front-end for apt so yes, you can't have aptitude without having apt-get (which is part of apt)
I tried to find help on Lacie forums and people are running full debian on those machines but until now Nas4 got no love from the community.
Replacing the firmware does seem like the best solution to me but can't help you with that sad.gif
 

Attachments

simur612

Member
May 25, 2018
879
0
16
all that is because you told the install script to install everything to root and the webserver-user (www-data) doesn't have any permissions on root's dirs
you should run the script again and pass A "NORMAL" USER as an argument instead of root
also, I am not here to teach you Linux, Debian or whatever. do some effort to learn the basics yourself, that's also how I learned it
I found out the problem now. I had to make the destination folder to www that it can be access with "Get file" everything working now smiley.gif


It now working smiley.gif I also used another script which allow me create multiple users.

I used this script: https://raw.github.com/Notos/seedbox-from-scratch/v2.1.9/seedbox-from-scratch.sh

The only bad thing about is that you cannot login to SSh via root

but if you login with user and make "su" it will put u as root.
 

Attachments

randac56

Member
May 25, 2018
915
0
16
Hi,

I'm trying to use your script on a fresh install of ubuntu 14.04.1 server 64 bit, running in vmware workstation 10. I'm logged in via ssh with the user matt.

I modified the first few lines of the script like this:

Code: [Select]
# (new) Maintainer user
XUSER="matt"
# Password for said user
XPASSWD="password"
# IP address of W1
W1IP="192.168.1.99"
# User account details for W1 (used for SSH/SCP)
W1USER="matt"
# Command to use to install packages from the repo's
PINSTALL="aptitude -y install"
# Build packages using checkinstall?
CHECKINSTALL="1"
# Type of pacakge to build with checkinstall
# Valid options are "slackware", "rpm" and "debian"
# Not relevant if CHECKINSTALL isn't enabled
PAK_TYPE="debian"
# Webserver root dir
WEBROOT="/var/www/html"
# Install ruTorrent?
RUTORRENT="1"
# Install ruTorrent plugins?
# This will also install dependencies for the plugins
# Not relevant if RUTORRENT isn't enabled
RUTORRENT_PLUGINS="1"
# User owner of the website
# Not relevant if RUTORRENT isn't enabled
WUSER="www-data"
# Group owner of the website
# Not relevant if RUTORRENT isn't enabled
WGROUP="www-data"
# Permissions (chmod) for the website
# Not relevant if RUTORRENT isn't enabled
WPERM="770"
# Init var for USER's home dir (do NOT change this one)
USER_HOME=$(awk -F ":" "/^${XUSER}:/ {print \$6}" /etc/passwd)

RTVERSION="0.9.3"
LTVERSION="0.13.3"
when I call the script I get an error immediately

matt@ubuntu:~$ sudo sh redtorrent.sh matt
useradd: user 'matt' already exists

Exit status: 9​
Any idea how a fix this? Also, did I modify the script in the intended way?

Thanks
 

peshua19

Member
May 25, 2018
897
0
16
Any idea how a fix this? Also, did I modify the script in the intended way?
Apparently I accidentally replaced the script by another one (no idea how that happened shocked.gif) but luckily I still had a local copy and have re-uploaded that. You can get the script from the link in the first post of this thread, everything will be clear and working now smiley.gif
 

Attachments