LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to mount an NTFS external drive as a normal user automatically? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-mount-an-ntfs-external-drive-as-a-normal-user-automatically-4175477524/)

krishnakishorerhce 09-17-2013 09:18 PM

How to mount an NTFS external drive as a normal user automatically?
 
I had NTFS fuse bundle installed on my system. I tried to mount an Eternal Hard disk of NTFS file system as a normal user, it shows error you doesn't have priviliges to mount this volume but I can mount it as a Super user and use it.

I have made an entry in fstab file as shown below

/dev/sdb1 /mnt ntfs defaults 0 0

but of no use.

I want my external hard disk to get mounted automatically whenever I connect it to my PC.

Pls help. Thanks in advance.

lleb 09-17-2013 09:32 PM

if the GUI is not mounting it for you, then you need to configure udev rules. sorry im not much help on how to do that, but google will be your friend.

yancek 09-17-2013 10:28 PM

The defaults will be to mount as root user so if you want to be able to mount that partition as a user, you need to indicate that in your fstab entry. It isn't really clear to me whether you want it auto-mounted, to be able to mount as a normal user or both?

krishnakishorerhce 09-18-2013 12:43 AM

I tried it by editing fstab file entry as

/dev/sdb1 /mnt ntfs defaults,user 0 0

and also to

/dev/sdb1 /mnt uid=500,gid=500 0 0

but of no use.


Quote:

Originally Posted by yancek (Post 5029641)
It isn't really clear to me whether you want it auto-mounted, to be able to mount as a normal user or both?

I need solution to mount it automatically. it is good if you mention both.

Thank you

onebuck 09-18-2013 06:01 AM

Member Response
 
Hi,

As root edit the '/etc/fstab' file. I use this for everyone to have access for win7;
Code:

/dev/sdb2        /mnt/win7        ntfs-3g    fmask=111,dmask=000 1  0
Please note the use of 'ntfs-3g' in the above line.
You might want to consider not using the fmask & dmask the way I have sampled since security will/can be an issue;
Quote:

From fstab;
umask=nnn, dmask=nnn, fmask=nnnSets the user file creation mode mask, umask, the same for directories only, dmask and for files only, fmask. More detailed information about the fstab file can be found in the man page about Linux fstab
To understand fmask & dmask you can look at fstab or 'man fstab'. Plus 'man mount' will provide useful information to understand options.

Hope this helps!


All times are GMT -5. The time now is 01:13 AM.