This site is now 100% read-only, and retired.

Question: User access to NTFS partition?

Posted by schwarzemann on Sun 18 Sep 2005 at 12:25

I have recently installed Sarge on my PC with the intent on moving to Linux as my primary desktop OS. Since most of my Linux experience is with Red Hat 6.2 (as in I haven't really touched Linux since 1999), I am a little rusty and needless to say a few things have changed in the world of computers since then.

I have not been living without a computer all this time; just have not been using Linux. That being the case I have a decent amount of data stored on a second hard disk in my primary box.

When I installed the second drive I decided to format it w/NTFS, since I was using Windows2000 and making the move to XP. Unfortunately now I have some 100+ gigs worth of data that I cannot access from Linux, that is w/out logging in as root.

My question is this: What are the options/permissions required in "fstab" to allow a non-root user to mount, and more importantly read, an NTFS partition?

 

 


Re: Question: User access to NTFS partition?
Posted by Anonymous (85.99.xx.xx) on Sun 18 Sep 2005 at 13:41
It has been a while since I last used NTFS, but setting the filesystem type to ntfs and setting the user and uid,gid options in fstab worked for me at dark ages... A sample fstab line might be like:

/dev/hda5 /mnt/bgates ntfs user,noauto,uid=me,gid=me,umask=000 0 0

The user and noauto options let ordinary users to mount/unmount the system, and the noauto option prevents it from being mounted at system startup.

[ Parent ]

Re: Question: User access to NTFS partition?
Posted by calibration (131.111.xx.xx) on Sun 18 Sep 2005 at 20:40
[ View Weblogs ]
That is slightly risky, isn't it? I would put umask=222, even though captive might not have been installed.

[ Parent ]

Re: Question: User access to NTFS partition?
Posted by Anonymous (82.230.xx.xx) on Fri 30 Sep 2005 at 21:59
You have to add "umask=022" in your fstab lines !
For example :
/dev/hda1 /mnt/hda1 ntfs rw,users,umask=022 0 0

It works fine ;-)

Take a look on :
http://www.dclug.org.uk/archive/2005/01/msg00459.html

[ Parent ]

Re: Question: User access to NTFS partition?
Posted by Anonymous (84.222.xx.xx) on Mon 19 Sep 2005 at 16:40
this is my setting in /etc/fstab:

/dev/sda1 /mnt/windows ntfs ro,user,noauto,gid=6,umask=0227 0 0

[ Parent ]

Re: Question: User access to NTFS partition?
Posted by Anonymous (69.157.xx.xx) on Mon 19 Sep 2005 at 22:02
this is the line i have in my /etc/fstab:
/dev/hda1  /mnt/c  ntfs  user,uid=1000,nosuid,gid=1000,noexec,nodev  0  0
this is for a single-user desktop system where "1000" is the uid of the one non-privileged user allowed to read this partition.

if my memory serves me right, i believe i had to install the libntfs5 package to enable NTFS functionality (please correct me if i'm wrong, everyone).
also note that this only allows read access to the given partition.

[ Parent ]

Re: Question: User access to NTFS partition?
Posted by suspended user schwarzemann (70.144.xx.xx) on Mon 19 Sep 2005 at 23:16
I was under the impression that NTFS was strictly READ ONLY from non-Windows operating systems... But I could be going off of completely wrong, or old information. PLEASE correct me if I'm mistaken (and if you'd be so kind to let me know how to go about writing to NTFS partitions w/out rebooting into XP)

[ Parent ]

Re: Question: User access to NTFS partition?
Posted by Anonymous (217.136.xx.xx) on Tue 20 Sep 2005 at 13:22
Hi,
This is probably out of topic, but i've choosen to go the other way around (each work for ext3 too):
- Ext2 Installable File System For Windows: It provides Windows NT4.0/2000/XP with full access to Linux Ext2 volumes (read access and write access). This may be useful if you have installed both Windows and Linux as a dual boot environment on your computer.
- [Ext2Fsd] -- Ext2 File System Driver: This project is an ext2 file system driver for winnt/win2k/winxp.
- Explore2fs: the WIN32 explorer for Linux ex2fs partitions. Be sure to also have also a look at EXT2 IFS.

Even more out of the subject (works with cryptoloop on linux):
- CrossCrypt: Open Source AES and TwoFish Linux compatible on the fly encryption for Windows XP and Windows 2000.
- FreeOTFE: FreeOTFE: Free On-The-Fly Encryption for MS Windows XP/2000/2003.

Sorry if it doesnt help a lot for your question, i just hope that someone migth find it helpfull. I choosed that way of doing things because linux doesnt allow you to write/create new files on ntfs and because fat32 have filesize limitations. I'm using those mostly for video editing and dont get any problems due to access time while recording (Athlon 64 3000+/SATA discs). I felt the the crypto options where somehow related... (?)
Freddo.

[ Parent ]

Re: Question: User access to NTFS partition?
Posted by Anonymous (70.25.xx.xx) on Sat 24 Sep 2005 at 06:26
open shell, do su
enter root password
mkdir /mnt/ntfs
/mount /dev/hdXX -t ntfs /mnt/ntfs
exit

I don't have any fstab entries relating to my ntfs drives(dual booting) but the above works for me and gives my users read-only access (the ntfs driver will do read only, not write)

then open /mnt/ntfs in your favorite file manager

Works fine for me using Debian 3.1 (sarge)

[ Parent ]

Re: Question: User access to NTFS partition?
Posted by Anonymous (70.25.xx.xx) on Sat 24 Sep 2005 at 06:42
Forgot something; let me try it once more

open shell, do su
enter root password
mkdir /mnt/ntfs (this step necessary only once)
chmod 644 /mnt/ntfs (this step necessary only once)
/mount /dev/hdXX -t ntfs /mnt/ntfs
exit

open /mnt/ntfs in favorite file manager


I assume you know how to get your hard drive?

drive one= hda
drive 2=hdb

partition one on drive one = hda1 (or hda2 depending on certain things;-)
partition one on drive 2 = hdb

for me I actually type mount -t ntfs /dev/hdb1 /mnt/ntfs

you could put all that in a script and make the script accessible by root only, using gksu or whatever to prompt for root password...I just open a shell whenever I need access to winbloz drives (necessary evil), place the script on the users desktop for quick access...

[ Parent ]

Re: Question: User access to NTFS partition?
Posted by Pizza_Pete (62.99.xx.xx) on Mon 26 Sep 2005 at 10:37
Hi.
Ich also would recommend the captive-ntfs driver, because then you also have write-support for the ntfs-partition. Get it here: http://www.jankratochvil.net/project/captive/

For this to work you need the orginal M$-NTFS-driver (ntoskrnl.exe, ntfs.sys) (not newer than WinXP SP1). If you install the captive-package you have several tools to integrate it in your system. For your fstab-needs, there is the program: captive-install-fstab which does the work automatically.

But be warned: For captive you need gcc and perl installed.
If you need further help, feel free to contact me.

regards PP

[ Parent ]

Re: Question: User access to NTFS partition?
Posted by Anonymous (194.54.xx.xx) on Thu 19 Apr 2007 at 14:44
NTFS-G3 worked for me the other day.


It is NTFS generation 3. ;)

Read and Write. And workey too..


mount /dev/hda1 -t ntfs-g3 /folder


edit fstab and put in the user,umask=022


Also explore2fs, and the other ext drivers stuff for win is extremely useful at times :)

[ Parent ]