New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Downloaded file ownership

Got problems with your B2 or B3? Share and get helped!
Post Reply
asl
Posts: 23
Joined: 07 Feb 2011, 14:17

Downloaded file ownership

Post by asl »

I just downloaded a torrent and found the file ownership was not what i expected:

-rw-rw-r-- 2 root www-data 366742268 Mar 29 15:24 foobar.avi

I was not expecting the owner to be root. I thought i would own it.

ftdclient -l -u <user>

shows it has the correct user name, and it has put it into my download directory in my home directory. So it just looks like it is missing a chown(2) when it creates the file.
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Downloaded file ownership

Post by Cheeseboy »

Hi asl,

This isn't the right place for your problem/question.
If you use a Bubba (first version), please post your question here:
http://forum.excito.net/viewforum.php?f=3

If you are using a Bubba|2 or a B3, please post it here:
http://forum.excito.net/viewforum.php?f=9

I have seen your question asked by someone else before, but no answers:
http://forum.excito.net/viewtopic.php?f ... ship#p9945

I don't have the same behaviour...

Code: Select all

ls -l ~/downloads
total 24
drwxr-xr-x 2 niklas users 4096 Feb 12 15:44 xyz
drwxr-xr-x 2 niklas users 4096 Jun 27  2010 xyz
drwxr-xr-x 2 niklas users 4096 Feb 12 17:01 xyz
drwxr-xr-x 2 niklas users 4096 Feb 12 14:36 xyz
drwxr-xr-x 4 niklas users 4096 Feb 12 18:33 xyz
drwxr-xr-x 2 niklas users 4096 Mar  5 16:24 xyz
This might be because you are not on the latest release or on a completely different machine than me (B3), or it might be because I have tweaked mine. Sorry, can't remember if I did.

I was going to write that I will ask one of the moderators to move this post to the correct forum, but as I don't know what version of the product you are using, I can't tell them what forum to move it to...

Cheers,

Cheeseboy
asl
Posts: 23
Joined: 07 Feb 2011, 14:17

Re: Downloaded file ownership

Post by asl »

Hi Cheeseboy

Thanks for your reply.

I put this into hacking/development because i think it is a bug. I would of preferred to of put it into a bug tracking system like bugzilla, but i've not yet found one. Also, it probably does not affect many people, only those with NFS server to export the filesystem. I then run into permission problems.

It is interesting that you show directories. What about files? What may also effect it is the download method, ftp, torrent, http,... So far i've only tried torrent.

My B3 is fully up to date.

I guess i need to go grab the source for ftd and see what it is doing when it creates files. Is there a chown(2) or not.
DanielM
Posts: 637
Joined: 28 Mar 2008, 06:37
Location: Sweden

Re: Downloaded file ownership

Post by DanielM »

I have not investigated this any deeper, but my theory is that this happens with torrents that only contain a single file, they always seem to get wrong permissions. Torrents that contain multiple files inside a directory get right permissions. Could this possibly compare with your observations?

/Daniel
asl
Posts: 23
Joined: 07 Feb 2011, 14:17

Re: Downloaded file ownership

Post by asl »

Humm, interesting. In syslog i see:

Mar 29 14:48:31 b3 ftd: Torrent Chown failed: No such file or directory
Mar 29 14:54:47 b3 ftd: Torrent Chown failed: No such file or directory

So it tried to chown() some files, but hard to know which. Looking at the code, it chown()s a few different things. Most likely it is in TorrentDownloader::ChangePermissions(): This is called by TorrentDownloader::CancelDownload() which i didn't do, and TorrentDownloadManager::HandleAlerts() when a tracker_announce_alert is received. I don't see "Tracker announce sent" in syslog, but that is probably because of LOG_INFO which could be filtered out.

Humm, need to investigate further, get syslog to log more and see if i can reproduce it. But first i have to go to work :-(
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Downloaded file ownership

Post by Cheeseboy »

Hi asl,

Regarding this forum:
If you have written some brilliant software for your B3 which you want to announce, or if you have questions about how to do it - this is the place. If you have problems with the functionality, please use the "B2 & B3 Support" forum.
If us other fellow users cannot help you, please email support@excito.com.

Regarding the FTD issue:
I don't think I have ever got a torrent that only has a single file from any of the few trackers I use that allows the FTD.
Your observations might be interesting to the excito crew.
Have you tried to strace the /usr/sbin/ftd process to see what is going on at the time of the message in the log?
DanielM
Posts: 637
Joined: 28 Mar 2008, 06:37
Location: Sweden

Re: Downloaded file ownership

Post by DanielM »

Cheeseboy is actually right. I'll move the thread to the correct place.

/Daniel
zwiri
Posts: 2
Joined: 23 May 2011, 16:30

Re: Downloaded file ownership

Post by zwiri »

Hello,

I'm having a similar problem on my B3. I have not been able to get my torrent downloads to work (ftp downloads work). The log displays:

Jun 5 22:14:51 b3 ftd: Torrent Chown failed: No such file or directory
Jun 5 22:14:51 B3 ftd: Tracker announce failed: tracker error

Tried via the GUI and saved the torrent file in the /home/<user>/torrents directory but both give the same problem, the download just won't start. Firewall settings seem to be OK, I'm able to download torrents via my PC behind the B3 router. Any suggestion on how I should proceed my investigation?

Thanks,
Zwiri
zwiri
Posts: 2
Joined: 23 May 2011, 16:30

Re: Downloaded file ownership

Post by zwiri »

zwiri wrote:Hello,

I'm having a similar problem on my B3. I have not been able to get my torrent downloads to work (ftp downloads work). The log displays:

Jun 5 22:14:51 b3 ftd: Torrent Chown failed: No such file or directory
Jun 5 22:14:51 B3 ftd: Tracker announce failed: tracker error

Tried via the GUI and saved the torrent file in the /home/<user>/torrents directory but both give the same problem, the download just won't start. Firewall settings seem to be OK, I'm able to download torrents via my PC behind the B3 router. Any suggestion on how I should proceed my investigation?

Thanks,
Zwiri
Never mind my question, found the answer here:

http://forum.excito.net/viewtopic.php?f=9&t=3064

Thanks, Zwiri
johannes
Posts: 1470
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Re: Downloaded file ownership

Post by johannes »

@danielm, asl, cheeseboy,

Thanks for your work, and let us know the outcome or if you need us to investgate this.
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
DanielM
Posts: 637
Joined: 28 Mar 2008, 06:37
Location: Sweden

Re: Downloaded file ownership

Post by DanielM »

johannes wrote:@danielm, asl, cheeseboy,

Thanks for your work, and let us know the outcome or if you need us to investgate this.
Well, this should be fairly easy for you to reproduce. Download any torrent including a single file and the file will have wrong ownership...

/Daniel
johannes
Posts: 1470
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Re: Downloaded file ownership

Post by johannes »

@Daniel, right, didn't read properly, missed one post. I'll file a bug, thanks!
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
Post Reply