Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-19-2004, 06:56 PM   #1
Registered: Nov 2003
Location: Portland, OR, USA
Posts: 111

Rep: Reputation: 15
Please help this newbie read his XP partition!

I apologize for posting this, since it's a question asked many times. I've read through many of the posts on this, but so far I've not gotten it to work for me.

I'm trying to read my XP NTFS partition. I don't want to write to the partition - just read the files. It's on /dev/hdb3, and I'm trying to mount it to /mnt/winXP/G. Executing the command (from root):

mount -t ntfs /dev/hdb3 /mnt/winXP/G works fine, but only when I'm root. When I'm logged in as user, it says permission denied.

So I added this line to my /etc/fstab to try and auto mount it:

/dev/hdb3 /mnt/winXP/G ntfs ro, auto, user, noexec, umask=0007 0 0

This automatically allows root to access but not with my userID. Here I've tried various things to no avail:

- adding uid=501, gid=501 to the fstab line didn't help
- changing umask=<something else> doesn't work, and then root can't access either
- changing user to users didn't help

Any other suggestions? And when i make a change to /etc/fstab, is logging out & back in the only way to "reexecute" the file? Or is there a similar command like "source" with C-shells that will execute the file without logging out & back in?

Also, I'm confused as to the exact representation of umask. I've heard it's an octal, but then I've also heard that it's the opposite of chmod. So that umask=000 would leave the default of chmod 777, whereas umask=007 removes "others" from read, write and execute. And why does the umask number sometimes have 3 digits and other times 4?

Last edited by NickC; 08-19-2004 at 06:57 PM.
Old 08-19-2004, 07:08 PM   #2
Senior Member
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
taken from "man umask"

The umask is used by open(2) to set initial file permissions on a newly-created file. Specifically, permissions in the umask are turned off from the mode argument to open(2) (so, for example, the common umask default value of 022 results in new files being created with permissions 0666 & ~022 = 0644 = rw-r--r-- in the usual case where the mode is specified as 0666).
Old 08-19-2004, 07:45 PM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Are you sure you entered the correct uid number in the fstab entry. That should of worked. I noticed the spaces in your message for the entry. That may not be correct. Also, you can use your user name instead of the actual uid number.
/dev/hdb3 /mnt/winXP/G ntfs ro,auto,noexec,uid=nickc,gid=nickc,umask=007 0 0
Please note that I assumed your login name is 'nickc'. If you have more than one user you would like to share access to the drive with, then use a different group. Mandrake has a fileshare group for this purpose, but you can create a new group also.
For a winXP ntfs partition, you might want to use the noexec and nodev options. If this were a writable partition, a umask of 117 might be safer.

You might also try mounting it using the 'diskdrake' program as root. Using the GUI program to create the fstab entry will also include the proper font/character encoding options for the filesystem.

Details on the fstab options for various file system types are available reading the 'man mount' page.

Typing in 'man -Tdvi mount' will produce a .dvi file that you can view in kdvi or xdvi and print out.
Another option 'man -Tps mount' will produce a .ps (post script) file that you can view or printout in ghostscript. Also, you can enter 'man:mount' or 'info:mount' in konqueror, or the application launcher to view an html version. I find these formats much easier to read.

Good Luck!

Last edited by jschiwal; 08-19-2004 at 07:52 PM.
Old 08-20-2004, 12:55 AM   #4
Registered: Nov 2003
Location: Portland, OR, USA
Posts: 111

Original Poster
Rep: Reputation: 15
No, no spaces in my /etc/fstab definitions - maybe I typed them with spaces here.

I tried changing the UID/GID to my username, but that didn't work. I'm pretty sure the ID# of 501 is correct - I got from typing ID in a shell. And I don't get why it's not auto mounting at least as root. I thought the "auto" in the /etc/fstab line was supposed to do that.

I also tried the GUI version, and it DID add a line to my /etc/fstab that looked like this:

/dev/hdb3 /mnt/winXP/G ntfs user,suid,ro 0 0

This allowed auto mounting, but only for root. My regular userID wasn't able to access it.
I tried adding uid=nickc,gid=nickc to the line, but that didn't help. I then took out "suid" but still no luck. I can access it via root but not via my username.

Doing ls -ltr on /mnt/winXP shows the line:

dr-x------ 1 root root 4093 G

So looks like the user ID has read permissions, but the owner is root. When I try to chown to my userID (logged in as root), it complains that it's a read-only filesystem.

P.S. Thanks for the man:<command> within Konqueror tip! It DOES make it easier to read!

Last edited by NickC; 08-20-2004 at 01:10 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounted read-write Fat32 partition suddenly becomes read-only?? hohead Linux - General 8 04-05-2007 01:17 PM
partition that can be read by xp? andrewlkho Linux - General 6 07-05-2003 08:32 AM
read only partition bumpert Linux - Newbie 3 12-18-2002 03:06 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 09:45 AM
Partition .. READ ONLY mikeshn Linux - General 1 10-11-2002 07:58 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration