TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Jeff Dunlop
from: Mike Bilow
date: 1995-10-23 14:49:00
subject: Read-only media

Jeff Dunlop wrote in a message to Mike Bilow:

 JD>> I would like to detect whether a device found by
 JD>> DosQueryFSInfo is read-only.

 MB> Call DosQueryPathInfo() against the root directory of the device.

 JD> Thank you for the detailed example, but this seems
 JD> incomplete. Wouldn't a Netware volume with root access
 JD> denied but RW access allowed for particular subdirectories
 JD> look the same?

I don't know.  NetWare has a somewhat oddball mechanism for handling such
things, the "inherited rights mask," that hardly anyone ever
uses.  In other words, NetWare is unusual in that it allows explicitly
controlling how things propagate downward, and which permissions are
inherited.  This simply does not translate well to most operating systems,
including OS/2.

I do not believe that OS/2 will see any directory as read-only, as distinct
from a file, unless the whole file system is read-only, as it is in CDFS. 
The reason for this is that applications cannot modify a directory directly
under OS/2, but must go through the file system driver.  Some operating
systems, wuch as VMS, will allow opening a directory as a file and reading
its contents as data, but this is unsupported under OS/2.

NetWare provides different permissions for directories than for files, and
the exact way in which the differences are interpreted in OS/2 is up to the
NWIFS.IFS remote file system driver.  For example, suppose that someone had
write permission for a file but not for the directory in which it resides;
this would be meaningless.  Or consider the case where someone had create
but not delete prvilege in a directory; there is no consistent way to
translate this into a single "read-only" bit.

My best advice is to test this and see what happens.
 
-- Mike


--- 
* Origin: N1BEE BBS +1 401 944 8498 V.34/V.FC/V.32bis/HST16.8 (1:323/107)
SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 323/107 150 3615/50 396/1 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.