Closed abhilashca closed 2 years ago
Hi @abhilashca ,
You could look at the Procmon logs filtered on the file to see if anything looks suspicious. It might also be a good idea to implement GetFileSecurity and deny the delete action. You can even set the filesystem readonly at mount if you also do not want the user to write
Thank you for the reply @Liryna. Much appreciated. I have enabled DokanOptions.WriteProtection
at the time of mounting the disk. This has taken care of all the edit/delete scenarios.
Now, when I try to save a text file, I am getting below error message:
Any idea why the error message talks about bad image instead of access denied.
It looks like you have an invalid installation of dokan. The path for dokannp1 should be in system32.
I figured out the issue. Within ReadFile()
, if any the files are outside my remote files, then I was returning Not Implemented
.
I found this in my console - 12/17/2021 20:41:14 - [DokanNet] ReadFileProxy : \System32\System32\dokannp1.dll Return : NotImplemented ReadLength : 0
I think, I am good for now. Will reopen the ticket if I get stuck again. Thank you for the help. Much appreciated.
Hello,
I am using Dokan to show the files and directories that are on my remote server (or cloud) based on the target endpoint the app points to. I want to prevent the user from deleting Directory and Files that are listed in their virtual file system.
To prevent deletion of files and folder, I am checking for
DeleteOnClose
inCreateFile
. Below is the code snippet I have inCreateFile
.Now, when I try to delete a directory, I get below dialogs or prompts which is as expected.
Now, when I try to delete a file, I get below dialog with message - "Invalid MS-DOS function":
I think, the message "Invalid MS-DOS function" is shown because I haven't configured something properly.
Can anyone please help on how to show proper access denied error instead of "Invalid MS-DOS function".
Thanks in advance.