🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #5980

Re: Read-Only Directories in DOS

#5980
From: Edward John Kalenda
Date: Sat, 27 Apr 1991 06:45
28 lines
1637 bytes
>>  Is it possible to create read-only directories in DOS ?
>>
>>  I have tried setting the ReadOnly attribute but all this does is
>>  prevent me from removing the directory but I can still create, edit
>>  and delete files in the directory.
>>
>>  Surely all that needs to be done is prevent the file containing the
>>  directory information (ie: name,location,size,date etc) from being 
>>  updated.

This would work except that DOS says "its a directory, I don't need to
do all that file processing" so it doesn't check for read-only and all
that stuff. The only way I've seen to do this is to write a TSR that
checks all file creates and renames (move equivelent) to see if the
target directory has the read-only bit set and deny the action.

>>
>>  Any help on the subject would be much appreciated.
>
>DOS doesn't use files to store directory information. The directory
>information is stored in the FAT just like other file information. 

Actually, ALL the information about a file except for the cluster
chaining is stored in the directory file. DOS does not treat the
directory like normal files. You can't open it or read it or anything.

Ed
ekalenda@cup.portal.com
Technical Details
Message-ID: <41744@cup.portal.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!portal!cup.portal.com!ekalenda
References: <985@uqcspe.cs.uq.oz.au> <1991Apr26.164441.3064@netcom.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!portal!cup.portal.com!ekalenda
From: ekalenda@cup.portal.com (Edward John Kalenda)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Read-Only Directories in DOS
Message-ID: <41744@cup.portal.com>
Date: 27 Apr 91 06:45:31 GMT
References: <985@uqcspe.cs.uq.oz.au> <1991Apr26.164441.3064@netcom.COM>
Organization: The Portal System (TM)
Lines: 28