1
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
2Which are the permission of
~/.config
?ls -lad ~/.config
. Did you try to change theuid
guid
andumask
in/etc/init/deluge-web.conf
? – Hastur – 2015-10-14T13:30:34.100Changed ownership of the ~/.config directory and it worked. What umask do I need to use in the init config? – Dmitrij Kultasev – 2015-10-14T13:40:04.317
Following your needs or moods :-) (See below in the answer and in the reference). – Hastur – 2015-10-14T13:48:06.920