Page 1 of 1
fstab and mount confusion
Posted: Fri Mar 25, 2005 3:05 am
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?
Re:fstab and mount confusion
Posted: Fri Mar 25, 2005 3:18 am
by distantvoices
what access privileges have you set on that folder in windows?
Have you loaded the ntfs module into the kernel?
Re:fstab and mount confusion
Posted: Fri Mar 25, 2005 3:37 am
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]
Re:fstab and mount confusion
Posted: Fri Mar 25, 2005 3:41 am
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.
Re:fstab and mount confusion
Posted: Fri Mar 25, 2005 3:58 am
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)
Re:fstab and mount confusion
Posted: Fri Mar 25, 2005 4:02 am
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.
Re:fstab and mount confusion
Posted: Fri Mar 25, 2005 4:12 am
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.
Re:fstab and mount confusion
Posted: Fri Mar 25, 2005 4:51 am
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.
Re:fstab and mount confusion
Posted: Fri Mar 25, 2005 5:03 am
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?
Re:fstab and mount confusion
Posted: Fri Mar 25, 2005 5:33 am
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