On Sun, 20 Jul 2003, Dan Jones wrote:
> On Sun, 2003-07-20 at 13:40, Bill Mullen wrote:
> > On Sun, 20 Jul 2003, Dan Jones wrote:
> >
> > > I'm trying to mount an NTFS partition and make it readable by
> > > non-root. Regardless of how I mount it, however, it ends up with
> > > permissions of 600. I can read it as root but not as a regular
> > > user. The following is an edited copy of the command line which
> > > shows what's happening:
>
> > > [EMAIL PROTECTED] mnt]$ cat /etc/fstab
> > > /dev/hdc1 /mnt/hd ntfs user,ro,noauto,noexec 0 0
> >
> > Change this fstab line to:
> >
> > /dev/hdc1 /mnt/hd ntfs user,ro,noauto,noexec,umask=222 0 0
>
> Well, making progress anyway:
>
> [EMAIL PROTECTED] mnt]$ cat /etc/fstab
> /dev/hdc1 /mnt/hd ntfs user,ro,noauto,noexec,umask=222 0 0
>
> [EMAIL PROTECTED] mnt]$ mount /mnt/hd
>
> [EMAIL PROTECTED] mnt]$ cd hd
>
> [EMAIL PROTECTED] hd]$ ls
> ls: .: Permission denied
The same sort of "ls -l" info that you showed us before would help here.
> > All permissions are set at mount time, and cannot be altered while the
> > partition is mounted, for all Win32 filesystem types.
>
> I've mounted Win32 types before and never run into this. I could also
> swear that I've changed file permissions on fat32 systems.
No offense, but I doubt it. I swear at my faulty memory as well, FWIW. ;)
> Man says the default umask is the mask of the current process. How do
> you determine the mask of the current process?
The man page that pertains here is the one for "mount", not the one for
"bash" (the bash built-in called "umask" is a slightly different use of
the term). From the ntfs-specific section of the "mount" man page:
uid=value, gid=value and umask=value
Set the file permission on the filesystem. The umask value is
given in octal. By default, the files are owned by root and not
readable by somebody else. The umask value is given in octal.
A bit redundant, that, but useful nonetheless ... :)
Perhaps your best option is to place all users to whom you wish to give
read access into a group created for that purpose, and add ",gid=XXX" to
the options portion of the fstab string (XXX being numeric). If the only
user that needs access is you, the "uid" option will definitely do it.
--
Bill Mullen [EMAIL PROTECTED] MA, USA RLU #270075 MDK 8.1 & 9.0
"There are two kinds of people in the world, those who believe there are
two kinds of people in the world and those who don't." - Robert Benchley
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com