fstab and mount confusion

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
AR

fstab and mount confusion

Post by AR »

I've got Gentoo set up with everything I need but I'm having some difficulty understanding the finer points of mount. I've got the following lines in fstab:
/dev/hdb1      /mnt/NTFSstore   ntfs      noauto,user,ro,noatime   0 0
/dev/hda1      /mnt/WindowsXP   ntfs      noauto,user,ro,noatime   0 0
But whenever I do "mount /mnt/WindowsXP" it succeeds but gives me access denied errors whenever I try to enter the directory. I did a ls -l and the folder is owned by root:root with only u+rx, I assume I haven't set something properly but I don't really know what's going on, can someone enlighten me?
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:fstab and mount confusion

Post by distantvoices »

what access privileges have you set on that folder in windows?

Have you loaded the ntfs module into the kernel?
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
AR

Re:fstab and mount confusion

Post by AR »

Yes, I customised the kernel specifically, it does mount, I just can't get into the folder (I can as root but that isn't really acceptable).

I thought the Windows permissions might be a problem, they're on the defaults as I only just reinstalled Windows as well, is there an option that ignores the drive permissions? [ls -l as root yields root:root u+rx on everything]
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:fstab and mount confusion

Post by Candy »

you might try mounting it explicitly as one user, but I'm not sure that is enough. Try making it user-mountable, that usually gives that user full rights in the mounted filesystem.
AR

Re:fstab and mount confusion

Post by AR »

To clarify:
I log in as a normal user and execute "mount /mnt/WindowsXP", it succeeds
I type "cd /mnt/WindowsXP" and it spits out "bash: cd: /mnt/WindowsXP: Permission denied"
I execute "su" and "cd /mnt/WindowsXP" and I can access it

Output from "mount":
/dev/ide/host0/bus0/target0/lun0/part1 on /mnt/WindowsXP type ntfs (ro,noexec,nosuid,nodev,noatime,user=andre)
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:fstab and mount confusion

Post by distantvoices »

it is a shot in the dark, but what if the mount point has only access privileges for root?

What would happen if you go su and then say chmod 777 [/mnt/WindowsXP]. then go to normal user mode and try to cd into the directory and type ls. i'd like to see what happens - have never encountered this kind of problems myself.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
AR

Re:fstab and mount confusion

Post by AR »

Ok, I think that has cleared it up, "chmod 777 /mnt/WindowsXP" gives out "chmod: changing permissions of '/mnt/WindowsXP': Read-only file system". It would seem Windows has configured the drive as root only.

I tried changing ro to rw in fstab and remounting but it still tells me it's readonly but NTFS write support is enabled in the kernel.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:fstab and mount confusion

Post by Candy »

You can't chmod on a windows partition, it's not like they have modes. You need to control the access from unix.
AR

Re:fstab and mount confusion

Post by AR »

That is sort of what I am asking how to do...
As far as I can see, it should work as is but it doesn't. Can someone just tell me how they mounted an NTFS partition step by step?
AR

Re:fstab and mount confusion

Post by AR »

Ok, I've got it working now, I had to add "umask=000" to fstab, final line:
dev/hda1 /mnt/WindowsXP ntfs noauto,user,ro,noatime,umask=000 0 0
thanks anyway
Post Reply