Page 1 of 1

Deluge-web does not start on boot

Posted: Wed Oct 14, 2015 7:39 pm
by sidukas
OS - Ubuntu 14.04 Server
OC - 8.1.3

I am trying to run deluge-web service under the deluge and getting permissions denied errors. My guess is because webui does not use the default location for config. Instead of that it is tries to get it from the my home directory. Deluge demon using the /var/lib/deluge/.config/ directory. However this is what I am getting.

Code: Select all

    myuser@ubuntu:~$ sudo -u deluge /usr/bin/deluge-web
    [sudo] password for myuser:
    [ERROR   ] 16:12:23 common:167 Unable to use default config directory, exiting... ([Errno 13] Permission denied: '/home/myuser/.config/deluge')
Ownership and permissions on the folder:

Code: Select all

    myuser@ubuntu:~$ ls -l /home/myuser/.config/
    total 4
    drwxrwxrwx 6 deluge deluge 4096 Oct 14 14:02 deluge
I've also tried to add "deluge" user to the "sudo" group (silly, but I really do not know how to solve that) and still getting the same error:

Code: Select all

    myuser@ubuntu:~$ sudo usermod -a -G sudo deluge
    myuser@ubuntu:~$ sudo -u deluge /usr/bin/deluge-web
    [ERROR   ] 16:17:30 common:167 Unable to use default config directory, exiting... ([Errno 13] Permission denied: '/home/myuser/.config/deluge')
However if I run it under "myuser" then it works well:

Code: Select all

    sudo -u myuser /usr/bin/deluge-web

This is my init script:

Code: Select all

    # deluge-web - Deluge Web UI
    #
    # The Web UI component of Deluge BitTorrent client, connects to deluged and
    # provides a web application interface for users. Default url: http://localhost:8112
    
    description "Deluge Web UI"
    author "Deluge Team"
    
    start on started deluged
    stop on stopping deluged
    
    respawn
    respawn limit 5 30
    
    env uid=deluge
    env gid=deluge
    env umask=027
    
    exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluge-web -l /var/log/deluge/deluge-web.conf -L warning

Re: Deluge-web does not start on boot

Posted: Thu Oct 15, 2015 12:14 am
by Cas
Two quick things:

1. Using `sudo -u` will not work as it's still using your myuser env. See this for details: http://askubuntu.com/a/294748/8570
2. That upstart exec line is not what is specified in the guide: http://dev.deluge-torrent.org/wiki/User ... ce/Upstart