LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   getting fat32 (Win98SE) part to mount with dmask and fmask options (http://www.linuxquestions.org/questions/linux-general-1/getting-fat32-win98se-part-to-mount-with-dmask-and-fmask-options-330143/)

Simon Bridge 06-03-2005 09:47 PM

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.

Simon Bridge 06-20-2005 04:40 AM

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.

gd2shoe 06-20-2005 03:57 PM

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).

Simon Bridge 06-22-2005 01:50 AM

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.)


All times are GMT -5. The time now is 11:02 AM.