Re: Making a device read only

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Mark Roddy (markr_at_hollistech.com)
Date: 02/11/05


Date: Thu, 10 Feb 2005 22:56:30 -0500

Andrue Cope wrote:
> David J. Craig wrote:
>
>
>>Under 2k you cannot permit a NTFS partition to be write protected.
>
>
> I'm not sure what you mean there. Win2K certainly supports read-only
> media. In our tests if we have a SCSI drive with a write protect jumper
> the volume will be mounted and is accessible. Win2k seems to understand
> the concept of a read-only NTFS volume from what we can tell. Our
> problem is that we are effectively lying to Windows and the resultant
> confusion causes a blue screen. Not that I particularly blame Windows
> for that :)
>
>
>>Also, not all devices use SCSI commands.
>
>
> Underneath, no. I'm guessing that NTFS always uses SCSI commands to
> talk to block devices though and if we could just sneak something in at
> that point it should solve the problem. Spotting a Mode Sense response
> and setting that bit would be trivial.
>
> Maxim's suggestion would probably be best of all except that we don't
> know how we could do that.
>

You write a disk filter driver that modifies the return value for the
IOCTL for the physical disk you want to modify the behavior of. The DDK
has the source code for disk.sys in the ddk so at least you are not
totally without clues. Heck it even has a sample disk filter driver. I'm
sure there are some minor design issues that you will have to resolve,
but it certainly is do-able.

>
>>One solution to the Windows 2000 is to have a
>>place to write the sectors and just wipe out that when the system is
>>rebooted or the device is removed.
>
>
> Yes. We have another piece of hardware that allows customers to mount a
> disk image stored on tape (after it had automatically been copied onto
> a hard disk). We implemented exactly that kind of solution. Embedded
> Windows has this feature as well but trying to implement it under Win2K
> presumably leads us back to storage device drivers.

-- 
=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com


Relevant Pages

  • Re: Security Tab in a Folder Properties - plllllllleeeeese HELP!
    ... If you want security, you need to convert to NTFS. ... Also you need to be using NTFS and not FAT32 file system. ... Windows XP Home: ... > earth can i password protect individual folders???? ...
    (microsoft.public.windowsxp.security_admin)
  • Re: WinXP home file security?
    ... He needs to be NTFS and also can only ... He should also password protect the Safe Mode Administrator as well as ... Windows XP Pro may be to much. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: password protect a second drive
    ... > I am adding a second hard drive to my windows xp Pro computer. ... Even if I can only protect certain ... How to disable Simple Sharing and set permissions on a shared folder in ... Note that the file system must be NTFS, ...
    (microsoft.public.windowsxp.general)
  • password protect a second drive
    ... I am adding a second hard drive to my windows xp Pro computer. ... fomrat it as NTFS and use the whole drive as a complete partition. ... Windows XP to password protect this entire ...
    (microsoft.public.windowsxp.general)
  • Password protect a second hard drive
    ... I am adding a second hard drive to my windows xp Pro computer. ... fomrat it as NTFS and use the whole drive as a complete partition. ... Windows XP to password protect this entire ...
    (microsoft.public.windowsxp.help_and_support)