View previous topic :: View next topic |
Author |
Message |
RazielFMX l33t
Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Wed Jul 19, 2006 8:26 am Post subject: Read Only mount permissions for NTFS [SOLVED] |
|
|
I'm not sure if this is the right place for this, but it seemed like a good place to start.
I just finished installing Gentoo on some free space I had on my primary HD. The second HD is all NTFS data, and primary partion of the primary drive is NTFS. Both of these I wish to mount read only into my limux box. Here is my fstab:
Code: |
rogue ~ # cat /etc/fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda2 /boot ext2 defaults,noatime 1 2
/dev/hda4 / ext3 defaults,noatime 0 1
/dev/hda3 none swap sw 0 0
/dev/dvd1 /mnt/dvd auto noauto,ro,users 0 0
/dev/dvdrw /mnt/dvdrw auto noauto,users 0 0
/dev/fd0 /mnt/floppy auto noauto,users 0 0
/dev/hdb1 /XP_DATA ntfs defaults,ro,noatime 0 0
/dev/hda1 /XP_SYSTEM ntfs defaults,ro,noatime 0 0
# NOTE: The next line is critical for boot!
proc /proc proc defaults 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
tmpfs /dev/shm tmpfs nodev,nosuid,noexec 0 0
#iPod entries
/dev/ipod /media/ipod vfat async,nodev,nosuid,users,rw,noauto 0 0
|
This works great, except the XP* dirs are chmod'd 500 and everything in them as well. How can I make this so that users can read data in these drives (ie I want to access my mp3s and whatnot from windows until I can make this box 100% linux, copy the second drive to the first, and make the second drive ext3, but that is a far away time). I don't want to have to be root to listen to my music.
Thanks! _________________ I am not anti-systemd; I am pro-choice. If being the latter makes you feel that I am the former, then so be it.
Last edited by RazielFMX on Thu Jul 20, 2006 9:19 am; edited 1 time in total |
|
Back to top |
|
|
oKtosiTe Tux's lil' helper
Joined: 15 Aug 2005 Posts: 122 Location: Halmstad, Sweden
|
Posted: Wed Jul 19, 2006 8:38 am Post subject: |
|
|
You can set a uid or gid like so: Code: | /dev/hdb1 /XP_DATA ntfs defaults,ro,noatime,users,uid=1000,gid=1000 0 0 | or change the umask to your liking. the mount manpage wrote: | Mount options for ntfs
iocharset=name
Character set to use when returning file names. Unlike VFAT, NTFS suppresses names that contain unconvertible characters. Deprecated.
nls=name
New name for the option earlier called iocharset.
utf8 Use UTF-8 for converting file names.
uni_xlate=[0|1|2]
For 0 (or `no' or `false'), do not use escape sequences for unknown Unicode characters. For 1 (or `yes' or `true') or 2, use vfat-style 4-byte escape sequences starting
with ":". Here 2 give a little-endian encoding and 1 a byteswapped bigendian encoding.
posix=[0|1]
If enabled (posix=1), the file system distinguishes between upper and lower case. The 8.3 alias names are presented as hard links instead of being suppressed.
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. |
Personally I use a vfat partition to share between the various operating systems. _________________ Ask Ubuntu | Super User |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54422 Location: 56N 3W
|
Posted: Wed Jul 19, 2006 8:46 am Post subject: |
|
|
RazielFMX,
Set umask=222 in the options in /etc/fstab. NTFS does not support permisions in the same way Linux does.
umask=222 is like for the entire NTFS filesystem. The bits set to 1 in umask are cleared in the permissions. You need the eXecute bit on directories or you cannot cd to them.
man mount explains all the options. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
RazielFMX l33t
Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Wed Jul 19, 2006 9:25 pm Post subject: |
|
|
oKtosiTe: This box has been windows for two years and I had never planned on putting Linux on it (just talked about maybe doing it). Though I had always left a 30GB partition for linux. So, everything was NTFS. I'm kind of kicking myself for that right now. I like the GID idea, I could create a 'winxp' group or something.
NeddySeagoon: Thanks for the advice!
I can see I'm going to have some manpage reading to do, and should have done that in the first place!
Thank you both for your ideas and help!
I shall try your ideas when I get home _________________ I am not anti-systemd; I am pro-choice. If being the latter makes you feel that I am the former, then so be it. |
|
Back to top |
|
|
yabbadabbadont Advocate
Joined: 14 Mar 2003 Posts: 4791 Location: 2 exits past crazy
|
|
Back to top |
|
|
RazielFMX l33t
Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Wed Jul 19, 2006 11:58 pm Post subject: |
|
|
Exactly what I need. When I get home, I will definately do as the WIKI says! _________________ I am not anti-systemd; I am pro-choice. If being the latter makes you feel that I am the former, then so be it. |
|
Back to top |
|
|
Rafal_Glazar Apprentice
Joined: 10 Jul 2004 Posts: 167 Location: Rzeszow, Poland
|
Posted: Thu Jul 20, 2006 6:02 am Post subject: |
|
|
You may also look at this thread. It is about userspace NTFS driver with full write support. _________________ "All I ask for is choice. I want to be able to go into any store you can buy a computer in and say, "I want ______ OS on this computer." Is that too much to ask? We can't always be looking out Windows. We also need to get work done." - Bill Olson |
|
Back to top |
|
|
RazielFMX l33t
Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Thu Jul 20, 2006 7:02 am Post subject: |
|
|
That is pretty cool, but I only want to mount RO for now anyway. Once this box is full linux, all will be ext3, and all this work will go out the window. For now, i only want WinXp touching my critical data, since it created it in the first place.
Once everything is moved to either a mac (if I ever get the one I want), or network storage, this box will be 100% linux. Or, if I can get WoW to work on linux before any of the aforementioned occur... I can't wait to be done with Windows. I actually like XP, but want to jump ship before Vista is forces upon me. _________________ I am not anti-systemd; I am pro-choice. If being the latter makes you feel that I am the former, then so be it. |
|
Back to top |
|
|
RazielFMX l33t
Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Thu Jul 20, 2006 9:20 am Post subject: |
|
|
These suggestions worked beautifully! I created a new group called ntfs, and set up a umask of 0227, with gid that of the ntfs group, and added myself to that group. Thank you! _________________ I am not anti-systemd; I am pro-choice. If being the latter makes you feel that I am the former, then so be it. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|