How can I make a directory read-only, but have its subdirectories be read-write?



To enforce read-only access a particular directory, but not its subdirectories, add two access rules like those shown by the following pseudocode:

CBFilter.AddFilterRule("C:\\ReadOnly\\*.*", ACCESS_READ_ONLY, ..., ...);

// Note that ACCESS_NONE (0) means "no access restrictions".
CBFilter.AddFilterRule("C:\\ReadOnly\\AllAccess\\*.*", ACCESS_NONE, ..., ...);

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@callbacktechnologies.com.