LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NTFS partition access (https://www.linuxquestions.org/questions/linux-newbie-8/ntfs-partition-access-538636/)

Red Barchetta 03-19-2007 01:03 AM

NTFS partition access
 
O.K., I am fairly new to Linux (not a total newbie, but not all that advanced either).
Anyway, I no longer have Windows installed at all (A SMALL partition for FreeDOS, but that's little to no help with this problem) but I have files on a few NTFS partitions I NEED to burn to CD/DVD before I re-format them with a Linux file system.
There are actually 4 NTFS partitions I need to do this with, but I am only doing one at a time. The on I am working with now, I got to mount fine, however it can only be accessed if you are logged in as root, and I am unable to change the permission because it is a Read-Only drive.
Since all I want to do is burn the files on it to CD/DVD it's not that big of a deal, but it would be nice to be able to read it from a normal user account as I don't know much about terminal commands, so I would be burning the disks with a GUI. I got Linux to allow me to login to a GUI as root (be default my version dose not allow this) but I really don't like the desktop for root shows up (that will be in a different thread), the way it is, while I am logged in as root to the GUI, it's hard to find anything!

If it helps, my fstab file (the mount point for the ntfs partition is /mnt/Work):

/dev/hde5 / ext3 defaults 1 1
/dev/hde7 /home ext3 defaults 1 2
/dev/hde1 /mnt/FreeDOS vfat umask=0,iocharset=utf8 0 0
/dev/hdc1 /mnt/Work ntfs defaults 0 0
/dev/hdg /mnt/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
/dev/hdh /mnt/cdrom2 auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=utf8,sync 0 0
none /proc proc defaults 0 0
/dev/hde6 swap swap defaults 0 0

GrapefruiTgirl 03-19-2007 01:58 AM

Try mounting the partition using 'defaults,noauto,user' in /etc/fstab. This should allow you as user to mount the drive from your own desktop. (NOTE: if it is already mounted by root, open a console, su to root, and type umount /dev/hdc1 to unmount it. Then you should be able to mount it as a user.)

Quigi 03-19-2007 09:11 AM

Grapefruit Girl's solution should work.

I think man mount gives the direct answer to your question, which lets you stay closer to your current setup:
Code:

Mount options for ntfs
[...]
      uid=value, gid=value and umask=value
              Set the file permission on the filesystem.  The umask  value  is
              given in octal.  By default, the files are owned by root and not
              readable by somebody else.

Probably umask is all you need. (I haven't tried it. My fstab entry is
/dev/sda1 /win ntfs noauto,user,ro,iocharset=iso8859-1,umask=0 0 0
)

Bruce Hill 03-19-2007 10:08 AM

This is what I change in /etc/fstab to allow non-root users to view NTFS filesystems:
Code:

#/dev/hda1        /WinXP          ntfs        ro              1  0
# Changed to allow users to view XP files in ntfs #
/dev/hda1        /WinXP          ntfs        users,umask=1000,ro,auto  1  0

It should remain a ro (read-only) filesystem.

PTrenholme 03-19-2007 11:06 AM

Another solution might be to do something like I do:
Code:

$ cat /etc/fstab | grep ntfs
/dev/hda1              /mnt/WinXP/c            ntfs-3g rw,uid=root,gid=disk 0 0

and just add the users for whom you wish to provide access to the "disk" group.

Of course in your case you would use the "ntfs" driver, and set access to "ro," but those are, I hope, obvious changes.

Red Barchetta 03-22-2007 03:06 AM

Well, that first suggestion did not work! I just now got the chance to get back on the Internet, so I hadn't even seen the other suggestions till now, but it's not that critical (my current installation is on a hard drive not actually mounted in the case anyway, it's just a loose "internal" hard drive I use mainly to test install disks, on temp storage for data when re-formatting [usually other peoples system]. So I just started backing it up under the root user account. But I'll give the other suggestions a try at some point, just to see if they work or not.
Just want to get the data off all NTFS partitions, so I can make a "permident" install of the OS (actually it's going to be a Dual boot of Linux and FreeDOS).

Red Barchetta 03-23-2007 05:22 AM

Quote:

Originally Posted by Bruce Hill
This is what I change in /etc/fstab to allow non-root users to view NTFS filesystems:
Code:

#/dev/hda1        /WinXP          ntfs        ro              1  0
# Changed to allow users to view XP files in ntfs #
/dev/hda1        /WinXP          ntfs        users,umask=1000,ro,auto  1  0

It should remain a ro (read-only) filesystem.


In case anyone else if wondering - this solution worked fine, and no need to manually mount the drive.. :)


All times are GMT -5. The time now is 05:11 PM.