"Access denied" error with FUSE mountpoint created using a sample Dokany Fuse Windows program using MSVC by linking against "dokanfuse2.lib" #1249
-
Hi all, Then started that sample program using the following command from Administrator-mode Command Prompt (in order to have "W:" as the FUSE mount-point): .\DokanFuseTest2.exe w -oallow_root -oallow_other -s I am able to see the "W:" drive but get an "Access denied" error while trying to go inside it. Please find attached the screen-shot. Also, please find the source code of the sample Dokany Fuse Windows program in the "TestDokanFuse.cpp" file present inside the attached zip file - What could I be doing wrong? Is linking against the "dokanfuse2.lib" file (using MSVC) supported? Or, is it supported only with "cygdokanfuse2.dll" file along with the use of the following Cygwin DLLs?
Please let me know. Any pointers will be much appreciated. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hi @dipujoseph-revenera , Have you been able to run the sample without changes ? Getting an "Access denied" error while trying to access it means somewhere in your implementation, you are either returning access denied (or similar) or there is an issue with the communication between your implementation and dokan (callbacks not called).
yes it is |
Beta Was this translation helpful? Give feedback.
-
Thank you very much @Liryna for responding (including confirmation of support for "dokanfuse2.lib" using MSVC) and for providing your valuable inputs. I will check regarding the points you mentioned and get back to you soon (after the holiday weekend here in India). |
Beta Was this translation helpful? Give feedback.
-
Hi @Liryna,
Please find the generated debug log file ("fusexmp.log") in the attached zip file - The above-mentioned log file was saved after trying to access (go inside) the mounted drive using Windows Explorer. Also, please note that the callback function "xmp_statfs()" did not get invoked anytime during the above-mentioned testing (confirmed using a separate debugging session with appropriate breakpoints set using the Visual Studio debugger). Please let me know if the attached debug log file gives any info or pointers regarding what might be going wrong. Thanks a lot, in advance, for your valuable inputs. |
Beta Was this translation helpful? Give feedback.
The main issue was that the callback functions were getting called with Unix-style paths instead of Windows-style paths in the function arguments. Code was added in the callback functions to convert the Unix-style paths to Windows-style paths before using them in places where Windows-style paths were expected.
After this, the XXX_getattr() function and XXX_open() function are working as expected.
Thanks @Liryna for providing the required pointers.
The list of "Gotchas" from https://www.cs.hmc.edu/~geoff/classes/hmc.cs135.201109/homework/fuse/fuse_doc.html were also very helpful.