On Sun, 2003-07-20 at 18:01, Bill Mullen wrote:
> 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.

[EMAIL PROTECTED] ddjones]$ mount
/dev/hdc1 on /mnt/hd type ntfs
(ro,noexec,nosuid,nodev,umask=222,user=ddjones)

[EMAIL PROTECTED] ddjones]$ cd /mnt/hd
[EMAIL PROTECTED] hd]$ ls
ls: .: Permission denied

[EMAIL PROTECTED] hd]$ su
Password:

[EMAIL PROTECTED] hd]# ls -ls
total 393884
   148 -r--r----x    1 root     root       150528 Jul 22  2002
arcldr.exe*
   160 -r--r----x    1 root     root       163840 Jul 22  2002
arcsetup.exe*
     0 dr--r----x    1 root     root            0 Feb  1 02:46 ATI/



> > > 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. ;)


Certainly, no offense taken.  I've sworn a great many things that turned
out not to be true, much to my chagrin.

> > 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 ... :)

I was looking at the man page for mount, but I was looking under options
for fat, not for ntfs.

> 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.

It's just me, and I actually went superuser to copy the files I needed
to a reiserfs partition before I posted here.  But I don't like using
root for non-administrative tasks as a matter of principle and I don't
like using a workaround without understanding why it's necessary.  I
don't learn anything that way. <G>

And now I am really confused:

[EMAIL PROTECTED] mnt]$ whoami
ddjones

[EMAIL PROTECTED] mnt]$ ls -l
dr--r----x    1 ddjones  root         8192 Jul  3 08:50 hd/

[EMAIL PROTECTED] mnt]$ ls -n
dr--r----x    1 501      0            8192 Jul  3 08:50 hd/

[EMAIL PROTECTED] mnt]$ mount
/dev/hdc1 on /mnt/hd type ntfs
(ro,noexec,nosuid,nodev,uid=501,umask=222,user=ddjones)

[EMAIL PROTECTED] mnt]$ cd hd
bash: cd: hd: Permission denied

Whiskey tango foxtrot?




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to