Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

How to block file edition on Network share drive using file system minifilter

Nikhil_V_SNikhil_V_S Member - All Emails Posts: 58

I have created a minifilter driver to block the access of files in network share drive. It is working fine .
Here I face an issue, not able to block file editing in it.
I have checked with the following flag values in miniprecreate.
But not able to block file edition.
Thanks in advance. Can you please provide a solution.


  • rstruempfrstruempf Member Posts: 103

    You won't be able to do this purely from IRP_MJ_CREATE's desired access and disposition, because those are often set for things that don't end up getting used, which would cause your filter to over block. To do this properly, you will need to allow most IRP_MJ_CREATES, except those that would modify your file during the create, and block specific actions, like IRP_MJ_WRITE, and many IRP_MJ_SET_INFORMATION's

    But specifically to what you are trying above, you've missed some entries. An existing file can be edited, for example, with a disposition of FILE_OPEN or FILE_OPEN_IF, or FILE_OVERWRITE_IF, etc., but you state that you are only checking for FILE_OVERWRITE.

  • Nikhil_V_SNikhil_V_S Member - All Emails Posts: 58

    thank you @rstruempf

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA