pasanlamahewa / rutorrent

Automatically exported from code.google.com/p/rutorrent
0 stars 0 forks source link

plugin erasedata does not erase anything #715

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Select one or multiple torrent(s) in rutorrent
2.Right-click and select "Remove And...Delete Data"

What is the expected output? What do you see instead?
It should delete the data and the .torrent but it does nothing instead. The 
data and torrent is still here.

What environment are you using?
1. My ruTorrent version is...version 3.4
2. My rTorrent version is...version 0.9.1 with libtorrent 0.13.1
3. I use web-server apache2 it version is 2.2.17 on OS Ubuntu 11.04
4. I use browser Chrome it version is 18.0 on OS Windows 7.
4. I am using erasedata version 3.4

Are some errors present in the web-server log?
Nothing is written

Are some errors present in the browser error console?
Nothing

Please provide any additional information below.
The folder rutorrent is owned by www-data and my user is in this group.

If you need anything else to know, let me know.

Regards

Original issue reported on code.google.com by fuch...@gmail.com on 7 Apr 2012 at 12:25

GoogleCodeExporter commented 9 years ago
1) It doesn't delete data immediately. Try to wait.
1) It doesn't delete .torrent *file* at all. Only torrent from client + data of 
torrent.

Original comment by novik65 on 8 Apr 2012 at 6:33

GoogleCodeExporter commented 9 years ago
Actually it deletes the .torrent but the data stay there, even after 30 
minutes...

Do you think it's a problem of rights coming from me?

Original comment by fuch...@gmail.com on 8 Apr 2012 at 9:58

GoogleCodeExporter commented 9 years ago
Try to enable logging in rtorrent. E.q.

log.execute=/tmp/exec.log

in console. Delete something. And check /tmp/exec.log for substring 'erasedata'.

>Do you think it's a problem of rights coming from me?

May be. Check rights for directory rutorrent/share. Web-server user and 
rtorrent user must have access to it and all its subdirectories/subfiles for 
read/write. (And 'execute' permission for directories, of course).

Original comment by novik65 on 9 Apr 2012 at 10:00

GoogleCodeExporter commented 9 years ago
Really strange since I had log.execute=/tmp/exec.log in .rtorrent.rc the plugin 
is working...

Original comment by fuch...@gmail.com on 9 Apr 2012 at 1:04

GoogleCodeExporter commented 9 years ago
If it will always work thanks a lot.

Original comment by fuch...@gmail.com on 9 Apr 2012 at 1:04

GoogleCodeExporter commented 9 years ago

Original comment by novik65 on 9 Apr 2012 at 1:06

GoogleCodeExporter commented 9 years ago
Hi,

actually it's not working always...
Sometimes there is nothing in the file /tmt/exec.log.

I tried to doa chmod 777 -R on /var/www/rutorrent but it did not do anything.

Do you have an idea what I can check after?

Original comment by fuch...@gmail.com on 13 Apr 2012 at 6:52

GoogleCodeExporter commented 9 years ago
I tried to launch rtorrent with the user root but it did not work too.

Original comment by fuch...@gmail.com on 13 Apr 2012 at 6:53

GoogleCodeExporter commented 9 years ago
you need to make sure your webserver has write access to your downloads folder 
so it can delete it

chmoding rutorrent to 777 means every user on your server can access rutorrent, 
but you want rutorrent to have access to your downloads. To do this properly, 
chown your downloads folder to [rtorrentuser]:[webserveruser] and chmod 770.

770 meaning rtorrent user + webserver user has full access and any other user 
has no access

Original comment by chris2...@gmail.com on 13 Apr 2012 at 7:05

GoogleCodeExporter commented 9 years ago
I did exactly what you said but it's still not working.

Original comment by fuch...@gmail.com on 13 Apr 2012 at 7:41

GoogleCodeExporter commented 9 years ago
I don't really understand when I am watching the log file sometimes I have 
nothing and sometimes for 2 minutes I have some logs that appears:

---
sh -c id -u > /tmp/rutorrent-stats-5625778134f88bb3457323 ; id -G >> 
/tmp/rutorrent-stats-5625778134f88bb3457323 ; echo ~ >> 
/tmp/rutorrent-stats-5625778134f88bb3457323 ; chmod 0644 
/tmp/rutorrent-stats-5625778134f88bb3457323
---

--- Success ---

---
rm /tmp/rutorrent-stats-5625778134f88bb3457323
---

--- Success ---

---
sh -c '/var/www/rutorrent/php/test.sh' php 
'/var/www/rutorrent/share/users/nicolas/settings/1602607710'
---

--- Success ---

---
sh -c '/var/www/rutorrent/php/test.sh' pgrep 
'/var/www/rutorrent/share/users/nicolas/settings/1717782707'
---

--- Success ---

---
sh -c '/var/www/rutorrent/php/test.sh' curl 
'/var/www/rutorrent/share/users/nicolas/settings/320869516'
---

--- Success ---

---
sh -c '/var/www/rutorrent/php/test.sh' mediainfo 
'/var/www/rutorrent/share/users/nicolas/settings/158021261'
---

--- Success ---

---
sh -c '/var/www/rutorrent/php/test.sh' ffmpeg 
'/var/www/rutorrent/share/users/nicolas/settings/1286987561'
---

--- Success ---

---
sh -c '/var/www/rutorrent/php/test.sh' unzip 
'/var/www/rutorrent/share/users/nicolas/settings/1224705015'
---

--- Success ---

---
sh -c '/var/www/rutorrent/php/test.sh' unrar 
'/var/www/rutorrent/share/users/nicolas/settings/1771563694'
---

--- Success ---

---
sh -c 'php' '/var/www/rutorrent/plugins/erasedata/update.php' 'nicolas' &
---

--- Success ---

---
sh -c 'php' '/var/www/rutorrent/plugins/erasedata/update.php' 'nicolas' &
---

--- Success ---

Original comment by fuch...@gmail.com on 13 Apr 2012 at 11:54

GoogleCodeExporter commented 9 years ago
*delete* something and *then* see to log.
Now log doesn't contain any information about your deletion attempts.

Original comment by novik65 on 16 Apr 2012 at 9:15

GoogleCodeExporter commented 9 years ago
yeah well this plugin does not work
I have observed this issue two on two different browsers IE and Firefox...

I deleted two torrents and files are not deleted
But funny things is that I cannot find any error in log files.

I'm using rtorrent 0.9.2 - but I guess this problems was also with 0.9.0 and 
just rutorrent 3.4

In attachment you can find all zipped logs.

Original comment by elsil...@gmail.com on 26 Apr 2012 at 12:08

Attachments:

GoogleCodeExporter commented 9 years ago
1) You upload a files, which contain your passkeys on a lot of trackers. 
tracker.btgigs.info, bit-hdtv.com etc, etc. I will not use its, but your 
archive was accessible for anyone during 7 hours. Change your passkeys.
2) Set $erasedebug_enabled in plugins/erasedata/conf.php to true. Delete 
something, wait 1 min and upload file /tmp/errors.log here.

Original comment by novik65 on 26 Apr 2012 at 8:06

GoogleCodeExporter commented 9 years ago
I'm also having this issue. 

Version: rTorrent 0.9.2/0.13.2

I think this is the relevant part of my execute.log (Cleaned up slightly):
/example.com/public_html/rutorrent/plugins/erasedata/cat.sh 
/example.com/public_html/rutorrent/share/users/my_username/settings/erasedata 
26935 /home/private/rtorrent/data/VideoFile.mkv
---
--- Success ---
/example.com/public_html/rutorrent/plugins/erasedata/fin.sh 
/example.com/public_html/rutorrent/share/users/my_username/settings/erasedata 
26935 5249B79F0DF5E61B2C00CB901618621ADAB550D2 
/home/private/rtorrent/data/VideoFile.mkv 0
---
--- Success ---
mv -u /home/private/rtorrent/data/VideoFile.mkv /home/private/rtorrent/done/
---
--- Success ---

Original comment by ke11...@gmail.com on 17 May 2012 at 4:32

GoogleCodeExporter commented 9 years ago
>/example.com/public_html/rutorrent/plugins/erasedata/cat.sh 
/example.com/public_html/rutorrent/share/users/my_username/settings/erasedata 
26935 /home/private/rtorrent/data/VideoFile.mkv

You delete torrent with data. It's data added to queue for deletion. And will 
be deleted in the nearest future (up to 1 min).

>mv -u /home/private/rtorrent/data/VideoFile.mkv /home/private/rtorrent/done/

But you move it's data to another directory. As result - it's can't be deleted, 
old directory doesn't contain it more. All correct.

Original comment by novik65 on 18 May 2012 at 8:17

GoogleCodeExporter commented 9 years ago
erasedata has never worked for me =(

/home/torrent/ is currently mod 777 -R to debug this plugin, still won't work.

[13.06.12 02:12:09] erasedata: *** Parse item 
/var/www/vhosts/<snip>/httpdocs/rutorrent/share/users/www-data/settings/erasedat
a/10D4E2545514F409CBD36DF188671B734F539B0F.list
[13.06.12 02:12:09] erasedata: FAIL Delete file /home/torrent/downloads/Diablo 
II + Lord of Destruction/Diablo II Cinematics.zip
[13.06.12 02:12:09] erasedata: FAIL Delete file /home/torrent/downloads/Diablo 
II + Lord of Destruction/Diablo II Install Disk.zip
[13.06.12 02:12:09] erasedata: FAIL Delete file /home/torrent/downloads/Diablo 
II + Lord of Destruction/Diablo II Play Disk.zip
[13.06.12 02:12:09] erasedata: FAIL Delete file /home/torrent/downloads/Diablo 
II + Lord of Destruction/Extra/Diablo 2 CD Key Generator.zip
[13.06.12 02:12:09] erasedata: FAIL Delete file /home/torrent/downloads/Diablo 
II + Lord of Destruction/Extra/LOD Expansion Key Generator.zip
[13.06.12 02:12:09] erasedata: FAIL Delete file /home/torrent/downloads/Diablo 
II + Lord of Destruction/Lord of Destruction Expansion Disk.zip
[13.06.12 02:12:09] erasedata: FAIL Delete file /home/torrent/downloads/Diablo 
II + Lord of Destruction/Patch/D2Patch_112a.zip
[13.06.12 02:12:09] erasedata: FAIL Delete file /home/torrent/downloads/Diablo 
II + Lord of Destruction/Patch/LODPatch_112a.zip
[13.06.12 02:12:09] erasedata: FAIL delete dir /home/torrent/downloads/Diablo 
II + Lord of Destruction/Patch
[13.06.12 02:12:09] erasedata: FAIL delete dir /home/torrent/downloads/Diablo 
II + Lord of Destruction/Extra
[13.06.12 02:12:09] erasedata: FAIL delete dir /home/torrent/downloads/Diablo 
II + Lord of Destruction

Original comment by electrog...@gmail.com on 13 Jun 2012 at 9:18

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
>is_file returns false for all my filenames

is_file returns false if file size > 2G, for example. And this function isn't 
used in plugins code for check user's files.
Try to change line in the file erasedata/update.php from

if(@unlink($file))

to 

if(unlink($file))

and you will see reason of deletion fail in the web-server's errors log.

Original comment by novik65 on 13 Jun 2012 at 10:56

GoogleCodeExporter commented 9 years ago
Bah, stupid plesk.  I missed it on my phpinfo, plesk has a ninja local php.ini 
with open_basedir set.  Fixed.

Original comment by electrog...@gmail.com on 13 Jun 2012 at 12:30