# mounting usb-storage device

## rshadow

I have an external USB 2.0 HD and am having trouble mounting this device.  The device under udev is located at /dev/uba1.  I can mount this drive with no problems as root, however the problem comes in when I try to mount this drive under a regular user. 

The drive mounts succussfully, however no permission to view the drive.  Below are relevant entries from /etc/fstab and the directory permissions.  This drive is formated using NTFS (due to the fact that windows will only partition a drive using NTFS .. my plan is one I get mounting in Linux solved I will reformat the drive using a FAT32 filesystem).

/etc/fstab

```

# /dev/uba1            /mnt/usbdrive   ntfs           rw, noauto, user                  0 0

/dev/uba1               /mnt/usbdrive   auto           defaults,noauto,user            0 0

```

directory permissions

```

sunflower1 mnt # ls -all

total 0

drwxr-xr-x   6 root root 168 Nov  6 03:01 .

drwxr-xr-x  19 root root 440 Nov  5 22:36 ..

-rw-r--r--   1 root root   0 Nov  5 08:20 .keep

drwx------   2 root root  72 Jul 18 10:15 cdrom

drwxr-xr-x   2 root root  48 Nov  5 22:35 dvd

drwx------   2 root root  72 Jul 18 10:15 floppy

drwxr-xr-x   2 root root  48 Nov  6 03:01 usbdrive

```

attempt to mount the drive

```

sunflower1 mnt # mount /mnt/usbdrive

sunflower1 mnt # ls /mnt/usbdrive

Development  Downloads  Games  IO.SYS  MSDOS.SYS  Movies  Music  My Shared Folder  System Volume Information  Web Stuff  dbackup  dxsdk

sunflower1 mnt # umount /mnt/usbdrive

sunflower1 mnt # exit

logout

bunn@sunflower1 bunn $ mount /mnt/usbdrive

bunn@sunflower1 bunn $ ls /mnt/usbdrive

ls: /mnt/usbdrive: Permission denied

bunn@sunflower1 bunn $

```

Maybe I'm just missing something easy here.. any ideas?

----------

## eelke

Its caused by the permissions on the NTFS file system. Add the following options

gid=users,umask=027

gid=users sets the group users as the group for all files on the drive.

umask=027 sets all permission flags not present in the mask.

027 will give the group read and execute permissions and root all permissions, others have no permission at all.

----------

## smerrima

wow I was having the same prob and that solution worked, thanks so much!

----------

## rshadow

Just in case you want to know.  I also found that hal works out pretty good too.  It pretty much automagicaly does everything.  I just wish NTFS write support in linux would be "stable" it sucks having to partition the drive into four parts for FAT32.

----------

## dkaplowitz

 *rshadow wrote:*   

> it sucks having to partition the drive into four parts for FAT32.

 I don't follow you here. I have a single 233 GB FAT32 partition on an external usb drive. FAT is the one that has the 2048MB partition limit, not FAT32

----------

## eelke

Yes FAT32 does support large partitions however it is not considered good practice to do so. First FAT32 is less efficient then NTFS or reiserfs, waists more space (especially with small files on large partitions) and last but not least checking and repairing a large FAT32 partition takes a long time. Because a FAT32 partition does not have journaling the risk of having to do a full check and repair is much larger then for journaled file systems. To reduce this risk and to increase efficiency it can be a good idea to divide a large disk into several partitions.

----------

