2

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
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

1 Answers1

1

With

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

Hastur
  • 19,483
  • 9
  • 55
  • 99