Re: msdos fs

Scott Johnson (johnsos@ECE.ORST.EDU)
Sun, 30 Jul 1995 10:28:44 -0700

You wrote:

Why are hidden and system files completely invisible?

They are? On my system (using both 1.3.3 and 1.2.10) they aren't. In fact,
I once created sixteen files under DOS in a directory, covering each possible
combinations of the H,S,R, and A bits. Under DOS, a normal DIR only lists
the four with both H and S cleared. DIR /A lists them all. Under Linux,
ls lists all of them, and I can access all of them. Those with R set Linux
marks as read-only, as far as I can tell, Linux ignores the A, H, and S bits.
(I haven't studied the MSDOS kernel sources all that much, so I may be

I don't see why these files aren't listed. DOS doesn't use names
starting with a dot, so files could be made hidden by adding a dot to
their name.

There is a patch which does this on sunsite (and its mirrors). Can't remember
the directory, though. Basically, whenever it encounters a file which is
hidden, it sticks a dot in front of the filename (or, ot be more precise,
what it THINKS is the filename.) Any file created with a leading dot is
marked hidden (and the dot is removed in the actual filename). Exceptions
are made, of course, for . and ..

I don't know if this patch uses the S bit or not.

And if it's for security reason, I don't think you need
access to the hidden and system files to damage something.

If you're worried about security, don't make the DOS partitions world-writable.
Make them owned by root if you don't want users to access them. If you want
SOME users to access them, make them owned by a bogus user MSDOS, and belong
to the group MSDOS. Any user who needs to access the DOS partition is made
a member of group MSDOS. The filesystem umask is set accordingly.

Hope that helps,


Scott Johnson -- Graduate Slave, ECE Department, Oregon State University
Check out my new (but unfinished) Web page--
A terrorist is someone who has a bomb, but does not have an air force.