Linux – Permission Denied on the raspberry pi transmission

debianlinuxpermissionsraspberry pitransmission

I installed on my Raspberry pi 3 running on Debian the headless version of transmission:

sudo apt-get install transmission-daemon

After this I stopped the service and I modified the settings:

sudo service transmission-daemon stop
sudo nano /etc/transmission-daemon/settings.json

Beyond changing user and password I changed also the download directory:

...
"download-dir": "/home/pi/Desktop",
...

After this I rebooted the service

sudo service transmission-daemon start

Now if I try to download any file I obtain the following error:

Error: Permission denied (/home/pi/Desktop/ubuntu-17.04-desktop-amd64.iso)

I don't see what I've done wrong.

Best Answer

The Transmission daemon runs as the debian-transmission user. This user is (probably) not allowed to write to /home/pi/Desktop. You can verify this with ls -ld /home/pi/Desktop and interpreting the output.

Change the permissions/ownership on /home/pi/Desktop or let Transmission download to a file where it is allowed to store data.

You can give debian-transmission access to the folder with chown or setfacl. In case you're not inclined to do any research on that, the following will probably work:

$ setfacl -m u:debian-transmission:rwX /home/pi/Desktop
Related Question