Page 2 of 4
Re: deluge-daemon script not working in karmic
Posted: Sun Dec 13, 2009 9:52 pm
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.
Re: deluge-daemon script not working in karmic
Posted: Sat Dec 19, 2009 10:18 am
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.
Re: deluge-daemon script not working in karmic
Posted: Thu Dec 31, 2009 3:11 pm
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
Thanks again!
Re: deluge-daemon script not working in karmic
Posted: Thu Dec 31, 2009 3:46 pm
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.
Re: deluge-daemon script not working in karmic
Posted: Thu Dec 31, 2009 4:20 pm
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
Re: deluge-daemon script not working in karmic
Posted: Thu Dec 31, 2009 4:33 pm
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
Re: deluge-daemon script not working in karmic
Posted: Sun Jan 03, 2010 11:45 pm
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
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
So close yet so far...........

Re: deluge-daemon script not working in karmic
Posted: Mon Jan 04, 2010 5:09 pm
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
So close yet so far...........

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.
Re: deluge-daemon script not working in karmic
Posted: Mon Jan 04, 2010 8:27 pm
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

Re: deluge-daemon script not working in karmic
Posted: Thu Jan 07, 2010 9:23 pm
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
