LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mounting windows in the fstab permissions problem (https://www.linuxquestions.org/questions/linux-newbie-8/mounting-windows-in-the-fstab-permissions-problem-473624/)

alex1986 08-13-2006 10:27 PM

mounting windows in the fstab permissions problem
 
mount /dev/sda2 /mnt/hd120

this command works just fine but I can only view that partition as root. AND i want it to auto mount in the fstab durring system boot AND be viewable by ALL users.

it's an NTFS but i don't know what the code line should be in the fstab.

bigrigdriver 08-14-2006 12:17 AM

I'm not exactly certain, but something like this, perhaps:

/dev/hda1 /mnt/windows ntfs ro,users 1 2

Change /dev/hda1 to the correct partition for your system.

kstan 08-14-2006 01:03 AM

do little it change if you use fat and want user can write thing to the partition, use this:
/dev/hda1 /mnt/windows vfat rw,users 1 2

oskar 08-14-2006 05:34 AM

Quote:

Originally Posted by bigrigdriver
I'm not exactly certain, but something like this, perhaps:

/dev/hda1 /mnt/windows ntfs ro,users 1 2

Or probably better: 0 0
I don't have a windows drive attached - it might cause trouble letting linux repair stuff. - see the fstab manpage for details (nothing can go broke if you mess up those options)

Change /dev/hda1 to the correct partition for your system.

Wouldn't that be "rw,users"

I use the umask option.

You can eighter make it Umask0222
Which would mean read,write,execute for you and read,write for anybody else. Which is probably not such a bad idea, or if you don't need to execute binaries from the ntfs disk, do umask=2222.
Take a look at:
http://www.opengroup.org/onlinepubs/...xcu/umask.html for more information

So this is at least a working option:
/dev/"your device" /mnt/hdf1 ntfs defaults,umask=0222 0 2

I have most my devices defined by their uuid, because I have exchange drives, and usb drives and an mp3 player, that might be mounted at the wrong place.

If this is the case, you can mount them using the uuid, which is not complicated at all.

with:
$blkid

you see the uuid of all connected devices, and you just exchange "/dev/whatever" with uuid=whatever


---
after saving fstab, you can try the new setup doing:
$sudo mount -a

alex1986 08-14-2006 12:50 PM

I have tried many many combinations of the options you are all giving me but it still will not automaitically mount. here is my fstab as is now:

/dev/hda2 swap swap defaults 0 0
/dev/hda1 / ext2 defaults 1 1
/dev/sda2 /mnt/hd120 ntfs rw,users 0 0
/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0


i just can not get that ntfs partition to mount.
BLAST!!!

TigerOC 08-14-2006 03:29 PM

Have you created the mount point (ie a directory) called hd120 under /mnt?

lord-fu 08-14-2006 08:59 PM

And make sure to add auto to that line.

robingazi 08-14-2006 11:44 PM

This is my fstab, this works fine for me. BTW most of the drives are vfat apart from 2 ext3 where debian and kubuntu is installed. You might want to change the 'vfat' to 'ntfs' if you are using ntfs. Hope this was helpful.

Quote:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/sda7 / ext3 defaults,errors=remount-ro 0 1
/dev/sda8 none swap sw 0 0
/dev/hdb /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/sda6 /media/kubuntu ext3 auto,user,rw,umask=0000 0 0
/dev/sda8 /media/win1 vfat auto,user,rw,umask=0000 0 0
/dev/sda9 /media/win2 vfat auto,user,rw,umask=0000 0 0
/dev/sda10 /media/win3 vfat auto,user,rw,umask=0000 0 0
/dev/sda11 /media/win4 vfat auto,user,rw,umask=0000 0 0
/dev/sda1 /media/win5 vfat auto,user,rw,umask=0000 0 0
/dev/sda5 /media/win6 vfat auto,user,rw,umask=0000 0 0

kstan 08-15-2006 01:09 AM

for your information linux not support ntfs well, use in your own risk. unless you use it as read only

robingazi 08-15-2006 01:22 PM

True, I'd recommend NTFS only in 'ro' mode. I changed all my drives apart two to vfat for write access.


All times are GMT -5. The time now is 08:49 AM.