Tell me more ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

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

6 Answers

up vote 4 down vote accepted

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

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

change

USER=debian-transmission

to

USER=root
ctrl-x
Y
# 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 at 1:47

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

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:

USER=root

share|improve this answer
That's a security risk. – Blaisorblade Mar 2 at 1:47
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

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 at 8:11

Your Answer

 
discard

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.