AddTorrent feature's directory list is empty

shwetha17

Member
May 24, 2018
785
0
16
Hey guys. New rTorrent/ruTorrent user here.

I'm still in the middle of configuring things and so far everything's going well. I haven't used rTorrent/ruTorrent to download a torrent yet because I'm behind rather restrictive firewalls here, but I'm configuring the system now so I can put the system up elsewhere and use it remotely. I'd like to get it working properly now before I move it offsite.

I'm testing things now and so far almost everything seems to work properly, however I'm having an issue with the nifty "getdir" plugin.

Problem: When adding a new torrent, the GetDir list is empty. No folders are listed.
Example: This is what I am expecting to see:

What I actually see is an empty list.

What I don't know yet (because I'm new to rTorrent/ruTorrent) is where this list is even looking. Does this list pull everything from the .rtorrent.rc's "directory=" directory?
Or does it pull from the config.php's $topDirectory?
Or perhaps from my .../www/share/users/tigereye/torrents directory?

Here's a summary of my setup:
The host is running slackware 13, with ruTorrent 3.0 and rtorrent-0.8.6/libtorrent-0.12.6
Apache 2 is hosting my ruTorrent site as a ssl'd vhost. The user "apache" is running Apache2.
My user's .rtorrent.rc file has "directory=/share/unsorted"
ruTorrent's 'conf/users/tigereye/config.php' file lists $topDirectory = '/share'
My '/share' directory is owned by user 'apache' with groupowner set as a new group: 'rtorrent'. Permissions are set to 755.
Both my user 'tigereye' and the webuser 'apache' are members of group 'rtorrent'

Thanks for any help you can offer,
 

somus1735

Member
May 25, 2018
833
0
16
Quote
What I don't know yet (because I'm new to rTorrent/ruTorrent) is where this list is even looking. Does this list pull everything from the .rtorrent.rc's "directory=" directory?
Or does it pull from the config.php's $topDirectory?
Or perhaps from my .../www/share/users/tigereye/torrents directory?​

Alghoritm:
1) If edit is contain path, we try to show contents of this path.
2) If this path is empty, or unavailable (permission error) then
2.1) if rtorrent and ruTorrent both run on some machine we try to show contents of rtorrent default download directory ("directory=").
2.2) else we try to show contents of $topDirectory directory.
2.3) If this path is unavailable (permission error) then you will see a empty combobox.

Warning: all this operations we make under web-server's user.
 

shwetha17

Member
May 24, 2018
785
0
16
Thanks for the details, novik.

I don't understand your point #1, but I do understand your #2.

My .rtorrent.rc says "directory = /share/unsorted"
My config.php says "$topDirectory = '/share/'"

My directory '/share' is owned by apache and groupowned by group 'rtorrent'. The permissions are RWXRWXR-X
Both 'apache' and 'tigereye' users are members of the 'rtorrent' group.

If I understand your algorithm correctly, my setup should be listing the contents of one of these folders in that dropdown box. I've created some subfolders in both /share and /share/unsorted (and matched the permissions) and none are being shown.

Can you think of anything else that could be wrong?
Can you point me to any logs or other debug info that could help shed some light on this?

Thanks!
 

somus1735

Member
May 25, 2018
833
0
16
Quote
I don't understand your point #1, but I do understand your #2.​

See screenshot. On it you may see 3 UI elements - edit,listbox and button. You can write directory name in that edit. Do this. Write /share/unsorted and press button. What do you see?
 

shwetha17

Member
May 24, 2018
785
0
16
Quote
See screenshot. On it you may see 3 UI elements - edit,listbox and button. You can write directory name in that edit. Do this. Write /share/unsorted and press button. What do you see?​

Ah - I understand now.

I just performed the following tests using Safari 4.0.5:
  • Browsed to ruTorrent
  • Logged in with my user
  • Clicked the "Add Torrent" globe button at topleft
  • Typed "/share" into the textbox
  • Clicked the "..." button
  • Observed an empty listbox.
  • Added a "/" at the end of the TextBox so it now read "/share/"
  • Clicked the "..." button
  • Observed an empty listbox.
  • Added "unsorted" at the end of the TextBox so it now read "/share/unsorted"
  • Clicked the "..." button
  • Observed an empty listbox.
  • Added "/" at the end of the TextBox so it now read "/share/unsorted/"
  • Clicked the "..." button
  • Observed an empty listbox.
I then repeated the above tests using Firefox 3.6 and observed the same results.

For reference, here is a capture of the permissions involved:
Code
tigereye@server:/$ pwd
/
tigereye@server:/$ ls -Ral share
share:
total 32
drwxrwxr-x 5 apache rtorrent 4096 2010-03-18 03:35 ./
drwxr-xr-x 21 root root 4096 2010-03-17 02:29 ../
drwxrwx--- 2 root root 16384 2010-03-04 06:56 lost+found/
drwxrwxr-x 2 apache rtorrent 4096 2010-03-17 03:05 sharetest/
drwxrwxr-x 3 apache rtorrent 4096 2010-03-18 03:35 unsorted/
/bin/ls: cannot open directory share/lost+found: Permission denied

share/sharetest:
total 8
drwxrwxr-x 2 apache rtorrent 4096 2010-03-17 03:05 ./
drwxrwxr-x 5 apache rtorrent 4096 2010-03-18 03:35 ../

share/unsorted:
total 12
drwxrwxr-x 3 apache rtorrent 4096 2010-03-18 03:35 ./
drwxrwxr-x 5 apache rtorrent 4096 2010-03-18 03:35 ../
drwxrwxr-x 2 apache rtorrent 4096 2010-03-18 01:08 unsortedtest/

share/unsorted/unsortedtest:
total 8
drwxrwxr-x 2 apache rtorrent 4096 2010-03-18 01:08 ./
drwxrwxr-x 3 apache rtorrent 4096 2010-03-18 03:35 ../
tigereye@server:/$In case the above isn't clear, there are 4 folders nested like this:
/share
/share/sharetest
/share/unsorted
/share/unsorted/unsortedtest

I'm expecting to see these folders listed in that listbox.

Thanks, somus, for giving me assistance!
 

jith45

Member
May 25, 2018
960
0
16
it's also important to note that you have to set the correct "top level dir" setting in the config.php for rutorrent
(check rutorrent/conf/config.php or rutorrent/conf/users/USERNAME/config.php )


$topDirectory = '/';


if that is set to / then it will look under / (everything)

but if it is set to something like /home/
then it weon't see anything under home.
 

shwetha17

Member
May 24, 2018
785
0
16
jith45,

My $topDirectory is currently set to '/share/'

Does this mean that it will *not* see anything under /share/ ?

EDIT: By default the $topDirectory is set to '/' which has a consequence of the "Free Space" icon at the bottomleft to show the free space of my '/' partition. Since I intend to save all of my torrents to the /share partition (which has much more space than '/') I modified $topDirectory to be '/share/'
This made the "Free Space" icon report the drivespace of the correct partition.

Is this the cause of my AddTorrent problem?
 

somus1735

Member
May 25, 2018
833
0
16
Quote
Thanks, somus, for giving me assistance!​

OK, i think, we have something bad with ruTorrent code.
Please, attach to your post
1) File rutorrent/share/users/tigereye/settings/rtorrent.dat
2) Output of command
ls -Raln /share
3) Output of command
ls -Raln [your rtorrent's session directory]
4) Your .rtorrent.rc file.
Or you may send all of that to my mail, if you wan't publish that data.
mailto:novik65[at]gmail.com
 

shwetha17

Member
May 24, 2018
785
0
16
I thought something was wrong - I'm very confident I've set things up correctly!

I've emailed a zip containing the 4 files you asked for.

Thanks, somus!