Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Raspberry Pi running RaspBMC with a WD MyBook connected using USB. The drive is automatically mounted to /media/My Book. I have created a folder /media/My Book/downloads and I have set Trasmission's download directory to be /media/My Book/downloads.

When I try to download a file, Transmission says

Error: Permission denied (/media/My Book/downloads/The.Simpsons.S24E09.720p.HDTV.X264-DIMENSION [PublicHD]/The.Simpsons.S24E09.720p.HD

ls -la gives me

drwx------ 1 pi       0 Dec 15 16:24 downloads 

So I guess the problem is that transmission runs under different user than pi and cannot write to the folder. However when I execute

chmod 777 downloads -R

the operations succeeds without any error but the permissions do not change, they stay 700 just for the owner.

What am I doing wrong and how can I enabled Transmission to write to that directory?

share|improve this question

12 Answers 12

The problem was the way the USB disk was automonted. I mounted it manualy with mount -t ntfs-3g and it started working.

share|improve this answer
Same happened to me. With the HDD auto-mounted all the permissions were set to 0700, but mounting it with sudo mount -t ntfs-3g -o uid=pi,gid=pi /dev/sda1 /media/HDD/ they are 0777 and transmission works perfectly, really weird. – Puigcerber Sep 29 '14 at 18:31

I'm no linux expert, but you could try this, might work. Most of this is info came from http://www.superfecta.ca/?p=44

sudo service transmission-daemon stop
sudo nano /etc/init.d/transmission-daemon




# hit enter to overwrite
sudo service transmission-daemon start

I know running as root is a big linux no no (not sure if that counts as running in root) but it worked for me so I'm fine with it. You could try USER=pi instead but I got no love there, so I stuck with root

share|improve this answer
Of course running as root works, it's just a security risk. – Blaisorblade Mar 2 '13 at 1:47
Just something to add: Linux uses /etc/fstab file to set up mount points and permissions/ownership of the drive. So, you have three choices, run transmission as root, run transmission as the owner of the folder where the drive resides (ls -l will tell you who owns it), or modify the /etc/fstab file to show a different owner (i.e. debian-transmission). – Terry Nov 16 '13 at 6:56
I was facing a similar problem with saving torrents on a NAS drive mounted as guest. I tried all solutions mentioned everywhere, but nothing worked for me, so I gave up and made transmission-daemon run as root. I don't like it, but it's the only thing that works. – aalaap Nov 18 '14 at 15:15
This is wrong and daemons like this should never run with root privileges. You should remove this answer because this will damage other peoples setup. – CousinCocaine Jun 7 '15 at 18:57

After lots of reading and frustration. First of all, make sure the normal user has read and write acces to the USB drive. The correct 'non-root' fix for having write acces to the USB drive is:

Step 1: Stop transmission daemon

sudo service transmission-daemon stop

Step 2: Add pi to debian-transmission group

sudo usermod -a -G debian-transmission pi 

Step 3: changing the daemon-user

sudo nano /etc/init.d/transmission-daemon

Change USER to pi.

Step 4 Change the rights of the configuration files folder

sudo chown -R pi /var/lib/transmission-daemon/info/
sudo chmod 755 /var/lib/transmission-daemon/info/settings.json 

Step 5: Set the correct permissions for the download / incomplete folders

sudo chown -R pi /somewhere/downloads
sudo chown -R pi /somewhere/incomplete

Step 5: Start transmission daemon

sudo service transmission-daemon start

Compiled from:

share|improve this answer
This is the only correct answer. Running as root is wrong. Doing a chmod 777 is wrong. Setting the correct group and user is the only correct way. – CousinCocaine Jun 7 '15 at 18:51
This should be the accepted answer. – regularjack Dec 2 '15 at 4:41
Maybe it’s correct answer but it doesn’t work for me. – rebolek Feb 13 at 9:00

I believe your problem is your USB stick is formatted as NFTS or FAT, filesystems that do not support the per-user/group permissions. The solution is to reformat as ext4. If you do that, you will also have much less lag if you are using your Pi as a media center. The drivers for the Pi are much faster when you use ext4.

share|improve this answer
Considerably faster than ntfs-3g? Could you show some data to back up that statement? – Joseph Apr 13 '15 at 7:22
@Joseph It was mostly a problem with the raspberry pi 1 as NTFS is quite CPU-heavy. Here's a benchmark of transfer speeds: htpcguides.com/wp-content/uploads/2015/03/… – bearbin Apr 14 '15 at 7:58
sudo chown debian-transmission /downloads

where /downloads is the directory you want your downloads to be in (or mount location).

this is safer than using root.

this gives the 'user' known as 'debian-transmission' rights to the folder

share|improve this answer

I found the same solution as Igor and puigcerber. My drive was set to auto mount, so I edited my fstab to remove the automount, then used sudo mount -t vfat -o uid=pi,gid=pi /dev/sda1 /media/*mymountpoint/

share|improve this answer

While biketire's answer is correct debian switched to systemd recently and you have to change the user now here

sudo nano /etc/systemd/system/multi-user.target.wants/transmission-daemon.service

and make sure that in the section


you have the line

share|improve this answer

I think one of the main things people are overlooking is that you should mount your usb/external drive in /mnt/myUsbDrive folder, and NOT in /media/pi/myUsbDrive.

sudo umount /media/pi/usb_disk
sudo mkdir /mnt/usb_disk
sudo mount -t ntfs-3g -o uid=pi,gid=pi /dev/sda1 /mnt/usb_disk

I tried every single answer given on this discussion (including root) in a hundred different ways with different options and could not get transmission to save on my usb SSD drive. Then while reading something different, it was mentioned not to mount in /media/pi since daemons or other groups may not have access. So i mount the USB drive to /mnt/usb_disk, set the paths in /etc/transmission-daemon/settings.json to /mnt/usb_disk/downloads and transmission starts saving to the disk.

FYI, I do have user=pi in /etc/init.d/transmission-daemon.

FYI, I did change owner of /mnt/usb_disk/downloads to pi and group to debian-transmission with 777 permissions.

share|improve this answer

Once you change the transmission-daemon user to root the permissions problem is gone with either a usb or smb share.

sudo nano /etc/init.d/transmission-daemon

then change the user line to:


share|improve this answer
That's a security risk. – Blaisorblade Mar 2 '13 at 1:47
This is wrong and daemons like this should never run with root privileges. You should remove this answer because this will damage other peoples setup. – CousinCocaine Jun 7 '15 at 18:59

The problem relates to FAT not recognising multiple users.

If you use a line in your fstab file such as /dev/[your dev] /mnt/usb1 vfat defaults,uid=65534,gid=65534,dmask=000,fmask=111 0 0

it should mount your filesystem with folders 777 and files as 666 owned by "nobody" belonging to "nogroup"

you will need to remount (or reboot) for the changes to be seen.

share|improve this answer
up vote 0 down vote accepted

Finally found a working solution.

I turned of autosharing removable devices in XBIAN settings and added the disk to shares.conf by hand

    path = /media/mybook
    guest ok = yes
    read only = no
    browseable = yes
    writeable = yes
    force user = xbian

Just adding it to shares.conf is not enough, autosharing must be turned off.

share|improve this answer

chmod 777 should give every user all permissions to a file or directory. If that doesn't work, it's likely that the user that execute that chmod command does not own the directory or file. For example, if root owns /media/My Book/ and the pi user will not be able to change the permissions of that file. The three numbers you pass to the chmod command affect the owner, the group, and everybody else, in that order. Thus the most common settings for a directory are "chmod 755 somedirectory". That mean the owner can read, write and change into the directory, but group and everyone else can only read files and change into the directory.

share|improve this answer
This answer really doesn't answer the question. The asker has already tried chmodding the file and it didn't work. – bearbin Feb 9 '13 at 8:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.