Multi-user help - ruT v3.1 using apache on Debian install

das329717

Member
May 25, 2018
928
0
16
Hello smiley.gif

Would someone be good enough to explain the basics for multi-user please ? I have looked through the forum but most are for other distros or older versions or ruT.

I have single user setup and working perfect by following this guide http://forums.rutorrent.org/index.php?topic=405.0
The script wont run but if i copy and paste each line its fine so the script ill look at later cheesy.gif At least its running so im happy

From what i understand by reading past posts theres a few important settings and i thought i had them but i guess not so this is where im at so far and would love a bit help

User 1 - root (yes i know its a security issue but ill change that later)
User 2 - joe123

After installing under the root account ive added the new user and added it to my sudoers files
Code:
joe123 ALL=(ALL) ALL
I added the new scgi mount in apache so now i have 2
nano /etc/apache2/apache2.conf
Code:
SCGIMount /RPC2 127.0.0.1:5000
SCGIMount /RPC3 127.0.0.1:5001
Saved and reloaded apache

Next i copied my root users rtorrent.rc file to joe123 home dir
Code:
cp ~/.rtorrent.rc /home/joe123and changed the port range so user 2 is on a different port range to user 1 and changed the SCGI mount to 5001

I created my directorys in home/joe123 .session downloads torrents and match my .rtorrent.rc file

After that i created 2 directorys for ruT in the /users directory
Code:
mkdir /var/www/rutorrent/conf/users/root
mkdir /var/www/rutorrent/conf/users/root
Then i copied my access.ini - plugin.ini and config.php into each users directory but this is where i got stuck because my rutorrent config.php has
Code:
$XMLRPCMountPoint = “/var/www/rutorrent/plugins/rpc”Can i use the same plugin for both users ? huh.gif or should they be "/RPC2" & "/RPC3" ?

Then for htaccess
Code:
htdigest -c /etc/apache2/.passwds Authorized joe123
But when i login the new user joe123 views the root users ruTorrent gui

Have i made a balls up or am i close ? huh.gif
 

Attachments

shwetha17

Member
May 24, 2018
785
0
16
dude, using root for rutorrent is beyond stupid.


anyways, all you need to do for multi user is:

create a unix user for each user (for running rtorrent)

each rtorrent user will run rtorrent on a different port and scgi port, and have a different location to save files (i user /home/USERNAME/rtorrent/download/ )


and in the rutorrent files, create a seperate config.php for each user, which goes in rutorrent/conf/users/USERNAME/ (you will have to create the directory which should be named the same as the user you plan to use for authentication)

then create your authentication file. If you do all this correctly, multiple user works fine.
 

das329717

Member
May 25, 2018
928
0
16
Quote
dude, using root for rutorrent is beyond stupid.​

I wont be keeping it like that but just for installing and learning it was easier.

Quote
create a unix user for each user (for running rtorrent)​

I did that and had my directorys :

/home/USERNAME/download
/home/USERNAME/.session
/home/USERNAME/torrents

My .rtorrent.rc file was :

/home/USERNAME/.rtorrent.rc

I have rutorrent config files in each users directory :

/var/www/rutorrent/conf/users/USER_1/config.php
/var/www/rutorrent/conf/users/USER_2/config.php

Can i use the rpc plugin twice though ? Both users ruT config.php have the same plugin :

$XMLRPCMountPoint = “/var/www/rutorrent/plugins/rpc”

Quote
then create your authentication file. If you do all this correctly, multiple user works fine.​

logging in as any user displays the root ruT gui huh.gif I cant work out how to get user 2 to see user 2 ruT gui because now both passwords end up at the same ruT
 

Attachments

shwetha17

Member
May 24, 2018
785
0
16
yes, you can. did you EDIT the config.php for each user changing the scgi and port settings?

did you configure some form of authentication for the rutorrent directory? something like this:
Code:
<VirtualHost *:443>
ServerName YOUR.URL.COM
ServerAdmin webmaster@localhost
SSLEngine on
SSLCertificateFile "/usr/local/etc/apache22/ssl/crt/server.crt"
SSLCertificateKeyFile "/usr/local/etc/apache22/ssl/key/server.key"
DocumentRoot /usr/local/www/rutorrent
AccessFileName .htaccess
<Directory />
Options FollowSymLinks
AllowOverride ALL
</Directory>
<Directory /usr/local/www/rutorrent/>
Options Indexes FollowSymLinks MultiViews
AllowOverride ALL
Order allow,deny
allow from all
</Directory>
<Location />
AuthType Basic
AuthName "rutorrent"
AuthUserFile /usr/local/etc/users.htpasswd
Require valid-user
</Location>

ErrorLog /var/log/apache2/rutorrent-error_SSL.log
LogLevel warn

CustomLog /var/log/apache2/rutorrent-access_SSL.log combined
SCGIMount /RPC1 127.0.0.1:5001
SCGIMount /RPC2 127.0.0.1:5002
SCGIMount /RPC3 127.0.0.1:5003
</VirtualHost>




notice how i have a password file at /usr/local/etc/users.htpasswd

then i use the htpasswd program to create users like this:
Code:
touch /usr/local/etc/users.htpasswd
htpasswd /usr/local/etc/users.htpasswd tom
htpasswd /usr/local/etc/users.htpasswd dick
htpasswd /usr/local/etc/users.htpasswd harry
then, i create multiple directories with all lowercase letters, one for each user.....
Code:
mkdir /usr/local/www/rutorrent/conf/users/tom
mkdir /usr/local/www/rutorrent/conf/users/dick
mkdir /usr/local/www/rutorrent/conf/users/harry

i then copy the config files needed to these directories:
Code:
cp /usr/local/www/rutorrent/conf/config.php /usr/local/www/rutorrent/conf/users/tom/
cp /usr/local/www/rutorrent/conf/config.php /usr/local/www/rutorrent/conf/users/dick
cp /usr/local/www/rutorrent/conf/config.php /usr/local/www/rutorrent/conf/users/harry

i then edit each file to have the proper settings.


btw, ALL of this is in the wiki.
http://code.google.com/p/rutorrent/wiki/Config