Proper permissions for restricted deluge daemon

Post Reply
Redsandro
Member
Member
Posts: 27
Joined: Mon Jul 25, 2011 3:50 am

Proper permissions for restricted deluge daemon

Post by Redsandro »

I have the Deluge Daemon running as a restricted system user called deluge.
Files are downloaded to a folder owned by mc:mc with permissions 777.
Downloaded files are owned by deluge:deluge with permissions 644 by default.

Everything is fine until a download needs to be 'checked'. My common sense says the files are readable by everyone, so checking should be no problem. However, checking stays at 0% until I chmod 777. Then the checking starts.

What is wrong here with my understanding of permissions?
Is there a way to have Deluge write those files as 777 by default, so other users may move/delete/edit the files?
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Proper permissions for restricted deluge daemon

Post by Cas »

There is a whole post dedicated to this topic: http://forum.deluge-torrent.org/viewtop ... ermissions

Several solutions:
  • umask when running the program
  • execute plugin to run a script on torrent complete
  • setup ACLs
Redsandro
Member
Member
Posts: 27
Joined: Mon Jul 25, 2011 3:50 am

Re: Proper permissions for restricted deluge daemon

Post by Redsandro »

Ah thanks. I learned that the umask functionality is already scripted into the init script, I just needed to edit it! Nice.

Now I have a different problem.
When files need to be 'checked' after I boot, they are still stuck at 0 percent. When I click on pause and then resume, checking continues normally.

Any clue what could be happening under the hood?
Redsandro
Member
Member
Posts: 27
Joined: Mon Jul 25, 2011 3:50 am

deluge-daemon starts too early

Post by Redsandro »

All files are still unavailable until they are paused and resumed. I have no clue why, but the only fix that can be done automated seems to be to restart the deluge-daemon after boot.

rc.local:

Code: Select all

# RED deluge daemon started too early - restart to unfreeze torrents 2011-12-19
/etc/init.d/deluge-daemon restart
I always put # comments like that everywhere I make changes to recognize them, but it is ofcourse only a guess. It feels like the daemon starts at a time where I/O is not available yet (aka too early), so the torrents are continually at 0% checked. Maybe the daemon also shuts down before state files can be properly written, because those checks are after every boot, although on my laptop (classic mode) checks are only occasionally, when an unexpected boot/crash occurred or something.
Post Reply