Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I mounted my USB hard drive using the instructions here and, well:

$ sudo mount -t ntfs -o umask=000 -rw /dev/sda1 "/media/MyBook/"
$ ls -l /media
total 12
(a couple irrelevent directories here)
drwxrwxrwx 1 root root 4096 Apr 28 11:11 MyBook
$ touch /media/MyBook/test
touch: cannot touch `/media/MyBook/test': Permission denied
$ sudo touch /media/MyBook/test
touch: cannot touch `/media/MyBook/test': Permission denied

So despite rwx permissions for everyone, no one, not even root, can create files on the drive. The permissions are the same on the /media folder & all of /media/MyBook's subfolders. I've chkdsk /F'd the drive in Windows; it works fine on there and on Ubuntu. I've also tried chmod 777ing and chowning the folders I need to write to; nothing works. What's going on?

Output of mount (no arguments):

/dev/root on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=216132k,nr_inodes=54033,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=44880k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=89740k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,errors=remount-ro)
/dev/sda1 on /media/MyBook type ntfs (rw,relatime,uid=0,gid=0,umask=00,nls=utf8,errors=continue,mft_zone_multiplier=1)

Update: The Pi's primary filesystem is an SD card, and I just noticed the card's switch is in the 'lock' position. I can't confirm that was the cause until I finish chkdsking the drive (AGAIN) but it sounds likely...I guess? Finally took care of that...it wasn't the problem. Any ideas?

share|improve this question
    
did you check the logs to check if the mount is effectively rw, and not ro? –  stijn May 21 '13 at 13:03
    
@stijn I checked /var/log/syslog but all i saw was this (with a timestamp): raspberrypi kernel: [256240.537351] NTFS volume version 3.1. –  Zelda64fan May 21 '13 at 13:43
    
can you post the output of mount then? Invoked witout arguments it just displays what's mounted and how.. –  stijn May 21 '13 at 13:44
    
@stijn I added it. –  Zelda64fan May 21 '13 at 13:48
    
seems fine - but I just noticed that umask.. I cannot test this atm, but I'm pretty sure you need to add somthing like uid=pi,gid=pi,umask=0222 to the mount line –  stijn May 21 '13 at 13:55

1 Answer 1

use

sudo mount -t ntfs -o umask=0022,uid=adam,gid=pi,rw /dev/sda1 /media/MyBook

(note the umask!)

or better, since you'r using an rpi which has the udisks command just use that so you do not have to manually run the mount command:

udisks --mount /dev/sda1

this normally picks the correct options automatically

share|improve this answer
    
Still getting 'permission denied'...Also, I really need it mounted so ANYONE can write to it; I'm (trying) to use it with Apache and the Transmission daemon. –  Zelda64fan May 21 '13 at 15:05
    
and the same command with umask=0000? –  stijn May 21 '13 at 15:22
    
It shows rwx permission for everyone, which is what I want, but it still says "permission denied" when I try to create a file. –  Zelda64fan May 21 '13 at 15:27

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.