Error starting deluge-web

General support for problems installing or using Deluge
Post Reply
teejvan
New User
New User
Posts: 2
Joined: Thu Feb 09, 2017 9:07 pm

Error starting deluge-web

Post by teejvan »

I have installed deluged and deluge-web on my Ubuntu 16.04.01 headless server. I can see deluged is running but I can't get deluge-web to run using the systemd script. If I run deluge-web from the terminal, it works!

Initially I followed the user guide on the forum and had both running with the deluge user and group, but I altered the start scripts to use myuser instead.

When I check the log for deluge-web I get the following:

Code: Select all

[WARNING ] 20:41:13 config:419 Unable to open config file: /var/lib/deluge/.config/deluge/web.conf because: [Errno 13] Permission denied: '/var/lib/deluge/.config/deluge/web.conf'
[ERROR   ] 20:41:13 config:431 Error writing new config file: [Errno 13] Permission denied: '/var/lib/deluge/.config/deluge/web.conf.new'
I have configured the systemd start scripts as such:

deluged.service

Code: Select all

[Unit]
Description=Deluge Bittorrent Client Daemon
After=network-online.target
Requires=storage.mount
BindsTo=storage.mount

[Service]
Type=simple
User=myuser
Group=myuser
UMask=007

ExecStart=/usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning

Restart=on-failure

# Configures the time to wait before service is stopped forcefully.
TimeoutStopSec=300

[Install]
WantedBy=multi-user.target
deluge-web.service

Code: Select all

[Unit]
Description=Deluge Bittorrent Client Web Interface
After=network-online.target

[Service]
Type=simple

User=myuser
Group=myuser
UMask=027

ExecStart=/usr/bin/deluge-web -l /var/log/deluge/web.log -L warning

Restart=on-failure

[Install]
WantedBy=multi-user.target
Best Regards,
Teejvan
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: Error starting deluge-web

Post by shamael »

The chosen user does not have access to /var/lib/deluge/.config/deluge/web.conf, it's a matter of permission
I guess you use another another when starting from the command line? (root or user with permission on the mentioned path)
teejvan
New User
New User
Posts: 2
Joined: Thu Feb 09, 2017 9:07 pm

Re: Error starting deluge-web

Post by teejvan »

So I went to change the permissions of /var/lib/deluge/ but apparently it doesn't exist? Also, that error only occurs when I attempt to use the systemd script. If I run deluge-web from the terminal as the same user as I have set in the systemd script it works.

I ran the command from the systemd script and it gave me the following error in the terminal

Code: Select all

IOError: [Errno 13] Permission denied: '/var/log/deluge/web.log'
So I checked the permissions and they were set to the old user/group! So I updated it and it works!

On reflection, I should have run the command as it was in the systemd script with the arguments for logging in the beginning, bet hey, everyday's a school day.
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: Error starting deluge-web

Post by shamael »

if you followed (or similar) http://dev.deluge-torrent.org/wiki/User ... ce/systemd then the below line was used for the dedicated deluge user

Code: Select all

sudo adduser --system  --gecos "Deluge Service" --disabled-password --group --home /var/lib/deluge deluge
Meaning the home folder of Deluge user is /var/lib/deluge with the configuration in /var/lib/deluge/.config/deluge/web.conf

At this point the configuration files are located under var/lib/deluge (home folder of Deluge), and ACL are Deluge/Deluge what you figure out :).
You can also set the home folder of mysuer to any folder (e.g. /var/lib/myuser) and copy the content to this new location, but not necessary I agree. I just love to have all squared :).

Enjoy Deluge ;)
Post Reply