EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How can I make the file read-only to certain process?

First you need to set CallAlOpenCloseCallbacks property to true.
Next you need to inspect the initiator of the request (using GetOriginator*() methods) in OnCreateFile and OnOpenFile callbacks.
If the file is opened for writing (or created) and you don't want the initiator to write to the file, throw ECBFSError exception with error code 5 (ACCESS_DENIED).

NOTE: do NOT cancel OnWriteFile requests to implement read-only functionality. Doing so can lead to unexpected side-effects for the system and for the calling process. OnWriteFile can be cancelled only when the actual writing has failed unexpectedly.

Return to the list


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!