LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-03-2005, 09:47 PM   #1
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
getting fat32 (Win98SE) part to mount with dmask and fmask options


Please refer to the following link for history:
http://www.linuxquestions.org/questi...hreadid=325869

My thanks to those who have wrestled with this problem in the Red Hat forum. This thread has turned away from being Red Hat specific and is more about windows (in linux) and so has become more suitable for the general forum. So here I am...

I am trying to get a windows fat32 partition to automount with permissions set to -rwxrw---- and drwxrw---- (read/write access for the logged in user - execute access only for directories and root). I have attempted this (via mount command - ultimately this will be an fstab entry - by the following (amongst many permutations):
Code:
# mount -t vfat /dev/hda1 /mnt/win98 -o rw,noexec,nosuid,fmask=0111,dmask=0,gid=users,iocharset=utf8
# ls -l /mnt/win98
total 4496
-rwxr-xr-x    1 root     users           7 May 14  2001 autoexec.bat
-rwxr-xr-x    1 root     users           0 Oct 30  2001 autoexec.bit
-rwxr-xr-x    1 root     users           0 Oct 19  2001 autoexec.via
drwxr-xr-x    6 root     users        8192 May 14  2001 bitware
-rwxr-xr-x    1 root     users       44337 Oct 19  2001 bootlog.prv
-rwxr-xr-x    1 root     users       45109 Oct 19  2001 bootlog.txt
-rwxr-xr-x    1 root     users       93890 Apr 23  1999 command.com
-rwxr-xr-x    1 root     users          30 May 14 17:15 config.sys
... as you can see, this did not work.
(I do not want any bits set for "others", and I want rw- not r-x for user...)

This is a RH9 machine running dual-boot with Win98SE 4.44. The Win98 disk was resized with fips. I note that the partition was not originally fat32 - it was originally fat16 and it has a utility for changing the fs to fat32 which says it has been run. (I have yet to see a win98 machine without this tho).

The users are all members of the "users" group.

The above mount options work when mounting a memory stick, and also when mounting a vfat partition. So what is so special about the win98 partition?

I can give users rw access using the umask option, but I also have to set the last bit (x access) so the directories will work. Naturally, I'm not too keen on users running executables on the win32 partition.
 
Old 06-20-2005, 04:40 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Original Poster
Rep: Reputation: 197Reputation: 197
I have the following intellegence to impart:

The above commands were run under the 2.4.20-6 kernel.

Apparently the 2.4 series kernels do not support dmask and fmask options.

The other tests were done under the 2.6.10 kernel (on another machine which is a dedicated linux box!) and so introduced confusion.

I guessed (wrongly) that if the man page exists then the feature must be supported. Silly me!

This leaves only to discover why the rw option fails to mount read-write only as advertised.
 
Old 06-20-2005, 03:57 PM   #3
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
I could be wrong, but I think the umask would be safe with the execute bit set, if you were to use the noexec option. This should stop execution of binaries anyway. I don't know about scripts. It may be worth playing with.

The rw mount option just designates whether or not you can write to the device at all. It doesn't do anything with file permissions (unless you're suggesting that you don't have write access).
 
Old 06-22-2005, 01:50 AM   #4
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Original Poster
Rep: Reputation: 197Reputation: 197
mount -t vfat /dev/hda1 /mnt/win98 -o umask=000 noexec

That may just do the trick. Unfortunately the machine in question has left my clammy clutches. I'll have to stick a linux partition on my remaining win98 machine to test this out.


(The mount command shown in the first post gives write access only to root.)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is fmask & dmask required to write to a WinXP share mounted on Mdrake SMB client ruscook_oz Linux - Networking 1 02-08-2007 05:50 PM
smbmnt,fmask=,dmask=,umask= ARRGGHHH mickboda Linux - Networking 3 12-23-2004 05:04 PM
dmask=,fmask=,umask= ARGHHHHHHH mickboda Linux - General 1 03-16-2004 04:32 AM
uninstalling win98se and getting fat32 partition space back chainsawieldinu Linux - Newbie 1 01-31-2004 02:43 AM
umask,dmask,fmask mmm Linux - General 1 08-14-2003 12:29 AM


All times are GMT -5. The time now is 08:09 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration