Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Read Only mount permissions for NTFS [SOLVED]

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
RazielFMX
l33t
l33t
User avatar
Posts: 835
Joined: Sat Apr 23, 2005 6:35 pm
Location: NY, USA

Read Only mount permissions for NTFS [SOLVED]

  • Quote

Post by RazielFMX » Wed Jul 19, 2006 8:26 am

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: Select all

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!
Last edited by RazielFMX on Thu Jul 20, 2006 9:19 am, edited 1 time in total.
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.
Top
oKtosiTe
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 122
Joined: Mon Aug 15, 2005 6:30 pm
Location: Halmstad, Sweden

  • Quote

Post by oKtosiTe » Wed Jul 19, 2006 8:38 am

You can set a uid or gid like so:

Code: Select all

/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
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Wed Jul 19, 2006 8:46 am

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

Code: Select all

chmod -R 555 *
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.
Top
RazielFMX
l33t
l33t
User avatar
Posts: 835
Joined: Sat Apr 23, 2005 6:35 pm
Location: NY, USA

  • Quote

Post by RazielFMX » Wed Jul 19, 2006 9:25 pm

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.
Top
yabbadabbadont
Advocate
Advocate
User avatar
Posts: 4791
Joined: Fri Mar 14, 2003 12:02 am
Location: 2 exits past crazy

  • Quote

Post by yabbadabbadont » Wed Jul 19, 2006 9:33 pm

Some additional information that might be useful to you can be found here:

http://gentoo-wiki.com/HOWTO_Mount_Wind ... 2C_NTFS%29
Bones McCracker wrote:On the other hand, regex is popular with the ladies.
Top
RazielFMX
l33t
l33t
User avatar
Posts: 835
Joined: Sat Apr 23, 2005 6:35 pm
Location: NY, USA

  • Quote

Post by RazielFMX » Wed Jul 19, 2006 11:58 pm

yabbadabbadont wrote:Some additional information that might be useful to you can be found here:

http://gentoo-wiki.com/HOWTO_Mount_Wind ... 2C_NTFS%29
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.
Top
Rafal_Glazar
Apprentice
Apprentice
Posts: 167
Joined: Sat Jul 10, 2004 2:31 pm
Location: Rzeszow, Poland

  • Quote

Post by Rafal_Glazar » Thu Jul 20, 2006 6:02 am

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
Top
RazielFMX
l33t
l33t
User avatar
Posts: 835
Joined: Sat Apr 23, 2005 6:35 pm
Location: NY, USA

  • Quote

Post by RazielFMX » Thu Jul 20, 2006 7:02 am

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.
Top
RazielFMX
l33t
l33t
User avatar
Posts: 835
Joined: Sat Apr 23, 2005 6:35 pm
Location: NY, USA

  • Quote

Post by RazielFMX » Thu Jul 20, 2006 9:20 am

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.
Top
Post Reply

9 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic