deluge-daemon script not working in karmic

General support for problems installing or using Deluge
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: deluge-daemon script not working in karmic

Post by Cas »

I am sure that the file permission issue is a Deluge bug as it is creating the files with 644 permissions.

Using umask in the init script has no bearing as the umask command cannot give permissions to a file that a program did not originally bestow on it.

Coincidentally a request for umask support in Deluge was posted here today: http://forum.deluge-torrent.org/viewtop ... ilit=umask

A workaround in the meantime that i can envisage is to use the Execute plugin to chmod the permissions every time a torrent has completed.

P.S. I am using this script on Karmic without issue.
thewanderer
Member
Member
Posts: 15
Joined: Mon Nov 23, 2009 12:11 pm

Re: deluge-daemon script not working in karmic

Post by thewanderer »

Thanks olmari for creating this script. The daemon and web ui run beautifully under karmic.

However, I'm having issues when trying to run flexget. For example, the deluge plugin has a "movedone" parameter. It creates folders using my userid but the deluge daemon downloads files using the "deluge" userid. The file is never moved to the final location, I think, because it doesn't have permission to move it there.

I've tried fiddling around by running flexget as "deluge" for example but I'm getting in all sorts of trouble.

Is anyone here using flexget and this script successfully. If so, care to share how you managed it please ;)

Many thanks.
elson
New User
New User
Posts: 6
Joined: Thu Dec 31, 2009 3:05 pm

Re: deluge-daemon script not working in karmic

Post by elson »

Hi,

I have just switched over to using Deluge and Flexget and am very happy with both so far, thanks to everyone involved.

However, I am having the same problem as thewanderer with the Flexget Deluge plugin "movedone" option, has anyone found a solution to this yet? I am also running Deluge under it's own user and Flexget as my regular user account. Any help would be greatly appreciated :D

Thanks again!
gazpachoking
Moderator
Moderator
Posts: 315
Joined: Sat Aug 18, 2007 2:28 pm
Location: Pittsburgh, USA

Re: deluge-daemon script not working in karmic

Post by gazpachoking »

thewanderer wrote: I've tried fiddling around by running flexget as "deluge" for example but I'm getting in all sorts of trouble.
Yeah, I would definitely recommend running flexget as your deluge user. That also makes connecting to the daemon easier (no username and pass required). What sort of troubles are you running into when trying that? Same for you elson, have you tried to have flexget run as your deluge user? Maybe I should see if deluge can create the movedone folder rather than having flexget do it, that would solve the problem as well. Currently if I don't create the folder in flexget, the deluge gtkui will throw errors when the file picker tries to show the nonexistent path.
elson
New User
New User
Posts: 6
Joined: Thu Dec 31, 2009 3:05 pm

Re: deluge-daemon script not working in karmic

Post by elson »

Hi,

I haven't tried running Flexget as the Deluge user, I didn't really fancy that as my knowledge of system users is a bit sketchy (to say the least).

Instead, I tried your previous suggestion of using the exec plugin to fix the permissions, which worked nicely (though it feels a little hacky). Here's what I used, in case anyone finds it useful:

Code: Select all

exec: mkdir -p "%(movedone)s" && chmod og+w "%(movedone)s"
Exec seems to be called before the Deluge plugin, so I have to create the directory and then chmod it, but it works just fine.

If you can't get Deluge to create the directory, perhaps you could add a umask option to the plugin to use when creating the movedone dir? That would remove the need to use exec, and provide a bit of flexibility.

Thanks for your help, Deluge+Flexget(+XBMC) is working really well for me now :-)

EDIT: updated code sample to use the movedone variable, better than repeating the path already configured
Last edited by elson on Thu Dec 31, 2009 5:14 pm, edited 5 times in total.
elson
New User
New User
Posts: 6
Joined: Thu Dec 31, 2009 3:05 pm

Re: deluge-daemon script not working in karmic

Post by elson »

Oh btw, I think I spotted a different issue with duplicate labels, have reported it over on the main thread: http://forum.deluge-torrent.org/viewtop ... 45#p116845

Thanks
thewanderer
Member
Member
Posts: 15
Joined: Mon Nov 23, 2009 12:11 pm

Re: deluge-daemon script not working in karmic

Post by thewanderer »

gazpachoking wrote:
thewanderer wrote: I've tried fiddling around by running flexget as "deluge" for example but I'm getting in all sorts of trouble.
Yeah, I would definitely recommend running flexget as your deluge user. That also makes connecting to the daemon easier (no username and pass required). What sort of troubles are you running into when trying that? Same for you elson, have you tried to have flexget run as your deluge user? Maybe I should see if deluge can create the movedone folder rather than having flexget do it, that would solve the problem as well. Currently if I don't create the folder in flexget, the deluge gtkui will throw errors when the file picker tries to show the nonexistent path.
Hi gazpachoking,

I think my "troubles" were because I'd started moving config files around and hacking around with permissions and worked myself into a black hole :o

I've now wiped my OS and started over and I've got a lot further this time ;)

A question you can hopefully answer very quickly and that's how to run flexget as "deluge": When I issue "sudo -u deluge flexget" via Putty, flexget it is looking for the config.yml file under my own username. So "sudo -u deluge" is obviously not the correct syntax for doing this, is it.
I can run flexget via webmin (as a cron job) as the "deluge" user no problems (it looks for the config file under /var/lib/deluge/.flexget) but I've no idea what webmin is doing correctly that I'm not :roll:

So close yet so far........... :lol:
gazpachoking
Moderator
Moderator
Posts: 315
Joined: Sat Aug 18, 2007 2:28 pm
Location: Pittsburgh, USA

Re: deluge-daemon script not working in karmic

Post by gazpachoking »

thewanderer wrote: A question you can hopefully answer very quickly and that's how to run flexget as "deluge": When I issue "sudo -u deluge flexget" via Putty, flexget it is looking for the config.yml file under my own username. So "sudo -u deluge" is obviously not the correct syntax for doing this, is it.
I can run flexget via webmin (as a cron job) as the "deluge" user no problems (it looks for the config file under /var/lib/deluge/.flexget) but I've no idea what webmin is doing correctly that I'm not :roll:

So close yet so far........... :lol:
Yeah I think if you give -H to sudo, it will set the home directory properly when running flexget. So: "sudo -H -u deluge flexget" try that.
thewanderer
Member
Member
Posts: 15
Joined: Mon Nov 23, 2009 12:11 pm

Re: deluge-daemon script not working in karmic

Post by thewanderer »

gazpachoking wrote:Yeah I think if you give -H to sudo, it will set the home directory properly when running flexget. So: "sudo -H -u deluge flexget" try that.
You, sir, are an absolute genius. The -H was exactly what was needed. Thank you :)
melat0nin
Member
Member
Posts: 16
Joined: Tue Apr 08, 2008 10:27 am

Re: deluge-daemon script not working in karmic

Post by melat0nin »

Hi guys

I've got a vanilla installation of Karmic, and I've tried following the instructions, but to no avail :(. I'm running the repo version, 1.1.9.

I didn't use the deluge user, instead changing it to my generic login in /etc/default/deluge-daemon, but that didn't work. When I execute the script, nothing shows up, and the daemon doesn't start (doing a 'killall deluge' says it's not running). Any thoughts would be much appreciated :)
Post Reply