rtorrent fails to poll a directory if every directory along the poll path is not readable by owner of the rtorrent process

Bug #1250598 reported by Antti Laiti
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
rtorrent (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I use these in my rtorrent.rc:

schedule = watch_directory_1,10,10,"load_start=/home/foo/bar/*.torrent,d.set_custom1=/home/rtorrent_user/ready"
system.method.set_key =event.download.finished,move_complete,"d.set_directory=$d.get_custom1= ;execute=mv,-u,$d.get_base_path=,$d.get_custom1="

If the owner of the rtorrent process has execute but no read access to directory /home/foo, rtorrent fails to poll the .torrent files in directory /home/foo/bar even though it would have all rights to that directory and its contents.

Just to clarify the situation:

$ ls -ld /home
drwxr-xr-x 9 root root 4096 Oct 17 08:55 /home
$ ls -ld /home/foo
drwx--x--x 7 root root 4096 Sep 7 18:37 /home/foo
$ ls -ld /home/foo/bar
drwxr-xr-x 6 rtorrent_user rtorrent_user 4096 Oct 24 17:16 /home/foo/bar
$ ls -l /home/foo/bar/test.torrent
-rw-r--r-- 1 rtorrent_user rtorrent_user 0 Nov 12 21:23 /home/foo/bar/test.torrent

Looking at the strace of rtorrent, it seems to try to read /home, then /home/foo and then it stops since it has no read access there.

Simple workaround that works:
ln -s /home/foo/bar /home/rtorrent_user/bar

and then change the rtorrent.rc to poll that directory.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in rtorrent (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.