Permission denied when downloading with transmission daemon

I installed Xubuntu and transmission daemon, set the download path to my home/user/TV shows, and get a permission denied when trying to download torrents through the transmission.

I tried chmod -r 777 on this folder without success.

Please help!

Following is the output of ps -ef | grep transmission

chen@htpc:~$ ps -ef | grep transmission
109       1023     1  1 21:46 ?        00:00:35 /usr/bin/transmission-daemon --config-dir /var/lib/transmission-daemon/info

chen@htpc:~$ ps aux | grep transmission
109       1023  3.2  0.4  47684 16620 ?        Ssl  21:46   1:20     /usr/bin/transmission-daemon --config-dir /var/lib/transmission-daemon/info
chen      1852  0.0  0.0   4200   772 pts/0    S+   22:27   0:00 grep --color=auto transmission

enter code here
Asked By: Chen Kinnrot

||

Assuming the path to the download folder is /home/chen/TV shows, run the following:

  • add chen to the debian-transmission group

    sudo usermod -a -G debian-transmission chen
    
  • change the folder ownership

    sudo chgrp debian-transmission /home/chen/TV shows
    
  • grant write access to the group

    sudo chmod 770 /home/chen/TV shows
    
  • Stop the deamon with

    sudo service transmission-daemon stop
    
  • The last thing to do is change the file creation mask, so that the downloaded files would be writeable by chen.

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

    … and change "umask": 18 to "umask": 2. Hit Ctrl+O to save and Ctrl+X to exit.

Start the daemon with

sudo service transmission-daemon start
Answered By: mikewhatever

This might be an apparmor profile problem. Transmission runs under the sanitized_helper profile in apparmor.

Look for complaints in /var/log/kern.log. grep transm /var/log/kern.log, particularly just after trying to run transmission and it failing.

Answered By: Jim Salter

This is a permission issue based on the user ID that is running Transmission. Transmission sets up a default user that you might not expect on first install. The user name is debian-transmission.

I will explain how to change that:

  1. Stop the Transmission daemon sudo service transmission-daemon stop
  2. Open the Transmission config file for editing: sudo nano /etc/init.d/transmission-daemon
  3. Find the line that says USER=debian-transmission and change it to the user that owns the folder in question. If you are not concerned about security issues, you can also use USER=root in this file. (Not advised, but good for troubleshooting).
  4. Alternatively (instead of point number 3), modify the /etc/fstab folder to mount the folder with correct permissions for the user that runs the transmission-daemon.
  5. Start the Transmission daemon sudo service transmission-daemon start
Answered By: Terry

I had same issue, and that was a mistake I had made when sym-linking the transmission download directory to my home/user/ directory, I changed the ownership of the sym-linked file which by consequence also changed the ownership of the transmission ‘download’ directory…

I just chowned back to ‘debian-transmission’ ownership and it worked like a charm (without need to restart service)

#chown debian-transmission:debian-transmission /var/lib/transmission/downloads

(well, you’ll have to check according your own linux distribution what is the right owner and eventually also your right path to the downloads directory)

Answered By: baobab33

This just happened to me. I found this page, was intimidated by all the jargon, so I restarted Transmission, reserved the torrent file to a different location, and saved the torrent data to the same different location (desktop). Worked like a charm…

Answered By: Alexia

Check if you’re using an “incomplete” folder.
The error can be misleading in this case and it may be the incomplete folder you do not have write access to.

Answered By: blockdor

I had similar issue with transmission. I got Permission Error while downloading even with correct folder permission settings on the external USB HDD.

I just mounted the external HDD to the /home/pi/ with the same permissions and it worked fine.

mount /dev/sda /home/pi/USB-HDD-MOUNTED

permissions are drwxrwxrwx (0777) pi:debian-transmission.
user name is changed to pi in /etc/init.d/transmisssion-daemon.

Answered By: Akos

Since this is the top search result in Google, for anyone reading this, I spend over an hour trying to get it to work. Turns out, the downloads folder specified in settings.json is “Downloads” instead of “downloads”. Note the case.

Answered By: SomeGuest1425125125

In my case the problem was how the drive was being mounted. Using this in /etc/fstab worked for me:

UUID=2069-1A05  /mnt/ext   vfat   rw,user,exec,umask=0000   0   0
Answered By: davidcm

Mounting the external drive into my home directory resolved this issue;

sudo mkdir /home/plex/media-server
sudo chmod 770 /home/plex/media-server
sudo mount /dev/sdxx/ /home/plex/media-drive

sdxx is the name of your hdd. you can use the following command to find yours:

lsblk
Answered By: liquidbender

Make sure that the path for your incomplete torrents is absolute. My main directory was using ~/path-to-download, which gave me an error. My incomplete directory was ~/path-to-download/incomplete.

I received an error the first time I tried to download a torrent not using an absolute directory. I fixed that, but kept receiving a permission denied error, even after adding the correct permissions. Once I fixed my incomplete path to an absolute path, everything worked.

Answered By: TorturdChaos

my problem was that transmission somehow was running as the user "transmissions-daemon" instead of the user it was supposed to run with.

Answered By: user1115637

Try this:

sudo setfacl -m u:debian-transmission:rxw  /home/*your user*/*your path to folder*
Answered By: Mika Bibika

None of these suggestions worked for me so I just set fstab to use transmission-daemon’s default download directory as the mountpoint to mount my USB stick.

  1. First I set the ownership of my USB stick to match that of the default download directory:

sudo chown debian-transmission:debian-transmission /media/pi/[mountpoint]/

  1. Edit fstab:

sudo nano /etc/fstab

Insert the following text:

UUID=[insert device UUID here] /var/lib/transmission-daemon/downloads ext4 rw,user,exec 0 0

Note: you can find your USB sticks UUID by running sudo blkid

  1. Reboot the system:

sudo reboot

  1. You can test whether it is writing data to your USB stick by running df -ha and checking whether the data written to your USB stick increases when you add a new torrent. Note that the data increase happens all at once when you add a new torrent and NOT gradually as the torrent downloads.
Answered By: sifr

I added the debian-transmission user to my $USER group:

sudo usermod -a -G $(whoami) debian-transmission
Answered By: Mark Smith

In my case I have the "download-dir", "incomplete-dir" (and "watch-dir") situated in my home-directory.

(presume my userid is ‘[user]‘)

ls -la /home/[user]/Transmission results in:

drwxr-xr-x  5 [user] debian-transmission 4096 sep 17 21:21 ./
drwxr-x--- 19 [user] [user]              4096 sep 20 20:08 ../
drwxrwxr-x  3 [user] debian-transmission 4096 sep 18 23:04 Completed/
drwxrwxr-x  4 [user] debian-transmission 4096 sep 20 20:11 Incomplete/
drwxrwxr-x  2 [user] debian-transmission 4096 sep 17 21:21 Torrents/

As you can see the user debian-transmission has all the necessary permissions to write in those directories except… it has no read and execute permission on /home/[user] !!! So as a result, debian-transmission cannot access its subdirectories either.

  • Lesson learned: check the permissions for the entire path ! Not just the final target directory !

There are now 3 options (choose one !):

  1. Add the group [user] to the user debian-transmission (sudo usermod -a -G [user] debian-transmission)
  2. Set x-permissions on world for /home/[user] (sudo chmod o+x /home/[user])
  3. Stop the deamon, move the whole directory tree /home/[user]/Transmission to the home directory of debian-transmission. Set ownership of those directories to debian-transmission:debian-transmission. Edit /etc/transmission-daemon/settings.json likewise. Add group debian-transmission to [user] and -finally- start the deamon again.

Option 1 and 2 have some minor security issues so option 3 is probably the best.

Answered By: T-men

2022 and I had the same issue.

A simple sudo chown debian-transmission:debian-transmission -R /path/to/download solved it for me.

Answered By: Bred Faiano

For those with custom locations, be sure you are applying chown to the original folder path and not a symlink.

sudo chown -R debian-transmission:debian-transmission /mnt/nas/downloads

NOT

sudo chown -R debian-transmission:debian-transmission /home/coolguy/nas/downloads

Add a 755

sudo chmod -R 755 /mnt/nas/downloads

I was able to get around the permissions issue by doing that. Also, no need to change the umask or 777 (or running as root, not a good plan).

Also, the latest transmission-daemon doesn’t seem to include and error log. Add this to your config file if you need some error output for debugging:

"log-error-file": "/var/log/transmission-error.log"

Be sure to restart

systemctl restart transmission-daemon
Answered By: FrankZappa

I had the same issues, given my downloads folder is /home/user/media. After fixing the permissions of that particular folder so that the user debian-transmission could read and write (see accepted answer), it still did not work.

The reason was that my /home/user folder had incorrect permissions, to prevent other users from reading its content. To access a directory, a user must have execute permission on the parent folder. To fix that:

  1. Either set to standard home folder permissions. All users will be able to read inside it now.
chmod 755 /home/user
  1. Either add debian-transmission to your user group:
sudo usermod -a -G user debian-transmission
Answered By: Sacha Lewin

Try to disable this setting, so no temprorary files should be save & cause permissions issue:

enter image description here

Answered By: AGriboed
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.