Proper permissions for restricted deluge daemon

Redsandro
Member
Member
Posts: 27
Joined: Mon Jul 25, 2011 3:50 am
OS or Distro: Mint 11

Proper permissions for restricted deluge daemon

Postby Redsandro » Wed Nov 23, 2011 6:30 am

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: 3463
Joined: Mon Dec 07, 2009 6:04 am
OS or Distro: Ubuntu 16.04
Location: Scotland

Re: Proper permissions for restricted deluge daemon

Postby Cas » Wed Nov 23, 2011 2:24 pm

There is a whole post dedicated to this topic: viewtopic.php?f=7&t=28425&hilit=permissions

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
OS or Distro: Mint 11

Re: Proper permissions for restricted deluge daemon

Postby Redsandro » Wed Nov 23, 2011 3:22 pm

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
OS or Distro: Mint 11

deluge-daemon starts too early

Postby Redsandro » Mon Dec 19, 2011 6:42 pm

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.


Return to “Off-topic Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest