Goal
I have a Raspberry Pi 3 with Raspbian and I want to make it a torrent seedbox by using Transmission. I followed all kinds of guides on the internet to solve problems I had on set-up and now everything is working, except starting Transmission on boot.
I read from How to enable transmission-daemon start at startup? that Transmission should automatically install a script on boot in /etc/init.d/transmission-daemon, which is indeed there. I applied the solution given in that answer, but to no avail.
Permissions
I think I have permissions set up wrong, because I can only access Transmission's webportal if I start sudo service transmission-daemon start as 'root' user (sudo su) and not when I run that command as user 'pi'.
NTFS external harddrive
Because I had write problems to my external ntfs drive, I tried all kinds of suggestions from different guides, which resulted in many user ownership changes to folders and files. Now I don't know which files I should chown to pi and which to debian-transmission. (I solved Error: Permission denied by umount /media/pi/Elements my drive, sudo mkdir /mnt/Elements and mount -t ntfs-3g /dev/sda1 /mnt/Elements, from: How to mount NTFS drive on a Raspberry Pi B, and then add the drive to sudo nano /etc/fstab with dev/sda1 /mnt/Elements ntfs-3g defaults,nofail 0 0).
Question
I identified that the following files are important for user permission:
/etc/init.d/transmission-daemon/etc/transmission-daemon/settings.json(withrpc-bind-address": "127.0.0.1)/mnt/Elements/transmission/{downloads,incomplete}(path to your download folder)
Also I set /etc/init.d/transmission-daemon: USER=pi
- Which folders and files I have to
chownorchmodtopiordebian-transmission?
I also tried sudo usermod -a -G pi debian-transmission and sudo usermod -a -G debian-transmission pi, but to no avail. (Obviously I'm a beginner who doesn't completely understand user permissions).
Edit 1:
It might have to do with that ls -l /mnt/Elements/transmission/ is set to root:
total 0
drwxrwxrwx 1 root root 0 date time downloads
drwxrwxrwx 1 root root 0 date time incomplete
However sudo chown -R pi:pi /mnt/Elements/transmission (or pi:root) doesn't change it, even after sudo chmod -R 755 /mnt/Elements/.
piandroot... but for Transmission, only as long as I dosuper suand start Transmission as root user. If I dosudo service transmission-daemon startas pi user, no error is given, but I can't access the Transmission page. (HDD was auto-mounted inmedia/pi/Elements, but I changed it tomnt/Elementsand manually added it to/etc/fstab). I can't seem to change the HDD user ownership fromroottopithough. – NumesSanguis Mar 27 '16 at 10:50sudo service transmission-daemon startis the correct command; services can't be manipulated by regular users per default. " I can't seem to change the HDD user ownership from root to pi though" If you dosudo suto actually become root (as opposed to "faking it" viasudo), you should be able to change the permissions/ownership viachmodandchown– jDo Mar 27 '16 at 10:55pi", that I can domkdir testas pi user on the HDD and that works fine. When trying again I noticed that(sudo) service transmission-daemon startactually doesn't work, even as root. Onlysudo /etc/init.d/transmission-daemon startworks? – NumesSanguis Mar 27 '16 at 13:00