Message Board -  Archive

[ Login ] [ Create Account ]
[ Board List ] [ View Board ] [ Post Reply ]
  Author  Subject: Re: mount HD with ntfs file system
Archive  

Posted on 06-17-2003 01:20 a.m. ET  reply

Original Poster: Mark Krentel

> But if I copy a file foo.doc from that HD to my home directory on the
> second HD which contains the linux file system then that copy is in a
> file system that is not read-only. So how come the copy in my home
> directory is still read-only?

Probably the file has read permission turned off, which is not the
same as being on a read-only file system. But once you've copied it
to a Linux file system, then you can chown and chmod it to whatever
you want. Root and the file's owner are allowed to chown/chmod a file.

Even without the umask and uid mount options, you should still be able
to copy the file off the ntfs as root. These options (if chosen wisely)
just allow you to get to the file without being root.

> But when I tried to change permissions I was root, so why is
>
> 'not readable by someone else'
>
> relevant?

Because you're trying to change them on the ntfs, which you can't do
on a read-only file system. Again, copy them to a Linux file system
and chmod them there.

> I looked at man mount and could not find umask as an option for ntfs,
> but assuming it is an option, I guess you told me the left hand digit
> should be 0 so that the user could read/write/exe but why did you set
> the other two digits to be 22?

Man mount in the "Mount options for ntfs" section has:

uid=value, gid=value and umask=value
Set the file permission on the filesystem. By default, the
files are owned by root and not readable by somebody else.
The umask value is given in octal.

The 1's in the umask are the prohibited bits in the permissions, so a
umask of 022 corresponds to a maximum permission of 755 (it can be
less). 022 is a good, standard default umask.

> Although I didn't need to try your second suggestion, how do I ask the
> system the value of my uid?

The command "id", or look it up in /etc/passwd.

--Mark

< Previous 1 Next >

Site Contents