Re: RFC: checking file systems support UF_HIDDEN, UF_SYSTEM
- In reply to: Rick Macklem : "Re: RFC: checking file systems support UF_HIDDEN, UF_SYSTEM"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 03 Jul 2025 19:24:57 UTC
On 2-7-2025 23:45, Rick Macklem wrote:
> I don't know why or when these were added to FreeBSD, but I believe
> their origin is in MSDOS long ago. The fat file system had these two flags
> that MSDOS used, called "hiiden" and "system".
> I believe "hidden" is somewhat similar to POSIX file
> names that start with "." and "system" made the file harder to delete.
> (But, I hate to admit I even recall anything about MSDOS;-)
>
> If you google "windows system and hidden" you'll get something that
> might answer your question, thanks to their AI
This happens when you grow old, memory starts acting up. ;-)
I even wrote a CPM and DOS driver for a wierd HD controller we had lying
around from some
Unix projects. (5 MB disks.)
But in MS-DOS the system flag was for files that were needed by the DOS
system
and should not be deleted easily, so basically files were hidden and not
deletable....
But with the right tools the flag was easily removed. (anybody remember
Norton disk editor?)
In essence it was a rather useless flag, it looked interesting but did
very little.
Once Long FileNames on FAT were created that was indicated by ORing all
flags...
READ_ONLY=0x01 HIDDEN=0x02 SYSTEM=0x04 VOLUME_ID=0x08 DIRECTORY=0x10 ARCHIVE=0x20 LFN=READ_ONLY|HIDDEN|SYSTEM|VOLUME_ID
So not sure it that would be of interest in representing a FAT
filesystem over NFS4
This is from an MS-DOS manual I had in my archives:
In MS-DOS, the "system" file attribute, when set, indicates that a file
is a critical system file required by the operating system.These files
are typically hidden from casual access and should not be deleted,
renamed, or moved without specific knowledge of the potential consequences.
Here's a more detailed explanation:
*
*System Attribute:*
This attribute is part of the file's metadata and tells the
operating system that the file is essential for its proper functioning.
*
*Hidden from View:*
Files with the system attribute set are usually hidden from standard
directory listings (like when you use the |DIR| command).
*
*Protection:*
The system attribute helps prevent accidental modification or
deletion of crucial files, ensuring the operating system remains stable.
*
*Examples:*
Files like |IO.SYS|, |MSDOS.SYS|, and |COMMAND.COM| in MS-DOS are
typically marked with the system attribute.
*
*Advanced Users:*
While the system attribute offers protection, advanced users can
still access and manipulate these files using specific commands or
tools, but this is generally not recommended unless you understand
the implications.
--WjW