Best way to mount Windows drives

Alan McKinnon alan at linuxholdings.co.za
Sun Mar 26 00:42:24 UTC 2006


On Saturday 25 March 2006 21:25, Chanchao wrote:
> In Dapper it seems by default any non-Linux drives don't get
> mounted automatically.  I can get to it by starting 'Disks' from
> the Administration menu, then it appears in the /tmp folder, and I
> can do a 'browse' as well. However that browser then runs as root,
> which makes it a lot harder to drag and drop files. (Like you cant
> drag something to the desktop then)
>
> I would like to have all drives mounted automatically at startup. I
> edited the /etc/fstab files and added my drives.  I included the
> 'user' option so that I can access the drives from my regular user
> account in gnome.  This works for my FAT32 drives, but not for my
> main NTFS drive. (I know NTFS is read-only, but the normal user
> also can't read it even though the 'user' parameter is specified.
> Do I have to specify additional parameters, specific permissions
> perhaps?

First, read man mount. It's all in there.

The user option allows a normal non-root user to mount volumes. It 
does not do too much especially regarding permissions.

I've found enormous difference between mount version and distros on 
what the default permissions are for mounting vfat and ntfs volumes. 
I now prefer to be explicit and use these options:

uid: the user id of the user that will "own" the ntfs files
gid: the user id of the group that will "own" the ntfs files
dmask: the umask applies to files on the ntfs partition
fmask: the umask applied to directories on the ntfs partition
auto: mounted when the system starts
ro: read only

There is a umask option, but you probably don't want this as it marks 
all files executable, and executable files on ntfs is nonsensical. 
You do want dirs to be executable, you don't want files to be 
executable. Assuming you want read access to owner group and all, use 
these options in fstab:

user,ro,auto,uid=0,gid=0,dmask=0222,fmask=0333

All this assumes that NTFS read support is enabled in your kernel. On 
Ubuntu it normally is.

-- 
Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five




More information about the ubuntu-users mailing list