I am trying to run deluge-web service under the deluge and getting permissions denied errors.

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:

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:

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:

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

What should I do?

UPDATE: This is my init script:

# 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 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
  • 2
    Which are the permission of ~/.config? ls -lad ~/.config. Did you try to change the uid guid and umask in /etc/init/deluge-web.conf?
    – Hastur
    Oct 14, 2015 at 13:30
  • Changed ownership of the ~/.config directory and it worked. What umask do I need to use in the init config? Oct 14, 2015 at 13:40
  • Following your needs or moods :-) (See below in the answer and in the reference).
    – Hastur
    Oct 14, 2015 at 13:48

1 Answer 1



Permission denied: '/home/myuser/.config/deluge'

the program says that it cannot access to the directory.
Check the permission for the father directory /home/myuser/.config with

ls -lad /home/myuser/.config

and change them if needed.

Below is an explanation of how you can manage access and permission of files downloaded through Deluge (umask parameter):

  • 007 grants full access to the user and members of the group Deluge is running as (in this case Deluge) and prevents access from all other accounts.
  • 022 grants full access to the user Deluge is running as and only read access to other accounts.
  • 000 grants full access to all accounts.

Further lectures

  • I've modified the question. Added the init script. Changed umask from 027 to 000 and it doesn't start anyway Oct 14, 2015 at 13:51
  • From the second link they propose "In the end i just let it use /var/lib/deluge as its config directory.", in the second iain created a user deluge, env uid=deluge, env gid=deluge ,env umask=000 in the config file and exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluge-web... BTW Did you restart it to allow it to notice the changes? (sudo stop deluge and sudo stop deluge-web followed by sudo start deluge) ...?
    – Hastur
    Oct 14, 2015 at 14:13
  • did not understand you well. However I do not know how to specify /var/lib/deluge as config directory ... I've changed the umask=000 and rebooted the machine. It did not help Oct 14, 2015 at 14:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .