Newbie Qs: Deluge service and SMB write access

Hello,

I have recently installed DietPi with the intention to get it up and running with Deluge, SickRage, et.c… These questions might be more related to my linux noobie:ness than DietPi in particular, so I apologize beforehand, and please feel free to move the topic if there is a more suitable place…

First question: I have installed Deluge using the dietpi-installer, and it runs fine when I boot/reboot. My question is how I can control it from the control line, i.e. starting and stopping the service? For SickRage (installed according to https://discourse.osmc.tv/t/how-to-install-couchpotato-and-sickrage-on-raspberry-pi/10788 with some minor tweaks), I can use ‘systemctl start sickrage’ if I have stopped it (manually or using the web client)… however it does not seem to work for deluge (it does not seem to restart by "systemctl start deluged’ )? If I try ‘systemctl status deluged’, I get

root@DietPi:/mnt/samba# systemctl status deluged -l
● deluged.service - LSB: Start or stop the Deluge BitTorrent daemon.
Loaded: loaded (/etc/init.d/deluged)
Active: active (exited) since Fri 2016-09-30 22:49:21 CEST; 11h ago

Sep 30 22:49:21 DietPi deluged[505]: Starting Deluge BitTorrent Daemon: deluged Not starting Deluge BitTorrent Daemon deluged, disabled in /etc/default/deluged.
Sep 30 22:49:21 DietPi systemd[1]: Started LSB: Start or stop the Deluge BitTorrent daemon…

If
What does the active (exited) mean in this case? …Should I just change the ENABLE_DELUGED in /etc/init.d/deluged to 1 instead of 0? If I do that, it seems I can restart it, but I can not connect using the Deluge client or web ui?

Second question: How do I grant write access to a certain user for samba shares? I have installed samba and mounted a network share under /samba, and with the root user I can read and write to it without problems. However, deluge and sickrage cannot which I guess have to do with rights? How can I add this access without granting them full root rights to “everything”?

Thanks,
Slothrop

As to the first question:

service deluged stop/start/restart/status

does it

Unfortunately it does not seem to work - even after running the above command (service deluged stop) I can connect to the daemon, and see it running using htop…

Check this thread - although this was fixed in a later version of DietPi.

https://dietpi.com/forum/t/deluge/513/3

In /etc/init.d/deluged I have ENABLE_DELUGED=1

and all working here.

Thanks for your reply, I’ll look into it a bit further.

As to my other question, is it possible to mount a drive with write access to all users, and not only root? I.e. how should my entry in fstab look? (Currently it is: //192.168.0.180/downloads_auto /mnt/dl cifs username=[XX],password=[XX] 0 0)… Or do I need to change permissions for the sickrage user (and if so, how)?

chmod 777 /downloads_auto/mnt/dl

will do what you want without messing with fstab

That doesn’t work either… :-/
It seems I can’t chmod anything on the share, even as root:

root@DietPi:/mnt/silencio_dl/testdir# ls -l
total 0
-rwxr-xr-x 1 root root 0 Oct 4 18:47 hej.txt
root@DietPi:/mnt/silencio_dl/testdir# su sickrage
sickrage@DietPi:/mnt/silencio_dl/testdir$ ls -l
total 0
-rwxr-xr-x 1 root root 0 Oct 4 18:47 hej.txt
sickrage@DietPi:/mnt/silencio_dl/testdir$ rm hej.txt
rm: remove write-protected regular empty file ‘hej.txt’? y
rm: cannot remove ‘hej.txt’: Permission denied
sickrage@DietPi:/mnt/silencio_dl/testdir$ exit
exit
root@DietPi:/mnt/silencio_dl/testdir# chmod +777 hej.txt -v
mode of ‘hej.txt’ changed from 0755 (rwxr-xr-x) to 0777 (rwxrwxrwx)
root@DietPi:/mnt/silencio_dl/testdir# ls -l
total 0
-rwxr-xr-x 1 root root 0 Oct 4 18:47 hej.txt
root@DietPi:/mnt/silencio_dl/testdir# su sickrage
sickrage@DietPi:/mnt/silencio_dl/testdir$ rm hej.txt
rm: remove write-protected regular empty file ‘hej.txt’? y
rm: cannot remove ‘hej.txt’: Permission denied
sickrage@DietPi:/mnt/silencio_dl/testdir$ ^C
sickrage@DietPi:/mnt/silencio_dl/testdir$ exit
exit
root@DietPi:/mnt/silencio_dl/testdir# rm hej.txt
root@DietPi:/mnt/silencio_dl/testdir# ls

My other option I guess would be to grant root rights to the sickrage user?

Have you tried to change the permissions on the computer the share is on?

I have I think a similar setup but use NFS shares as this method is said to give better performance and security is easy to setup on the device that hosts the share - for example you can give read and write permissions to all devices on your LAN or to specific devices by IP address.

As to running SickRage as root - I do this but it is probably not that clever a thing to do.

root@DietPi:/mnt/silencio_dl/testdir# su sickrage
sickrage@DietPi:/mnt/silencio_dl/testdir$ ls -l
total 0

Your running as a under privileged user sickrage, so you will need to set permissions for that user on the files/folders.

As root, try running the following:

chown -R sickrage:sickrage /mnt/silencio_dl



My other option I guess would be to grant root rights to the sickrage user?

Yes you could, or run sickrage as a root user. But, only if you trust sickrage with root privileges.