2

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 (with rpc-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 chown or chmod to pi or debian-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/.

NumesSanguis
  • 121
  • 1
  • 4
  • You mention a few issues that might or might not be related: external HDD mount/access and transmission-daemon issues. Just to be clear, is your external HDD auto-mounted via the line in /etc/fstab? Do you have full read/write access to it? Can you create/write/delete files and folders on it? – jDo Mar 26 '16 at 19:57
  • External HDD access is fine, both as pi and root... but for Transmission, only as long as I do super su and start Transmission as root user. If I do sudo service transmission-daemon start as pi user, no error is given, but I can't access the Transmission page. (HDD was auto-mounted in media/pi/Elements, but I changed it to mnt/Elements and manually added it to /etc/fstab). I can't seem to change the HDD user ownership from root to pi though. – NumesSanguis Mar 27 '16 at 10:50
  • I mean, can user pi read/write to the disk despite it being owned by root? Regarding transmission, sudo service transmission-daemon start is 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 do sudo su to actually become root (as opposed to "faking it" via sudo), you should be able to change the permissions/ownership via chmod and chown – jDo Mar 27 '16 at 10:55
  • I meant with "External HDD access is fine, both as pi", that I can do mkdir test as pi user on the HDD and that works fine. When trying again I noticed that (sudo) service transmission-daemon start actually doesn't work, even as root. Only sudo /etc/init.d/transmission-daemon start works? – NumesSanguis Mar 27 '16 at 13:00

0 Answers0