dokan-dev / dokany

User mode file system library for windows with FUSE Wrapper
http://dokan-dev.github.io
5.15k stars 657 forks source link

Dokan Mount Failed from remote using rdp #1150

Closed Lucasq11 closed 1 year ago

Lucasq11 commented 1 year ago

Environment

Check List

Description

I use rdp to connect my remote machine and mount my filesystem on D:\mount dir. It fails and I got log like below. When I refered to https://github.com/dokan-dev/dokany/issues/240#issuecomment-225802352, I used adminstator to open cmd and execute mount command, then it worked. I think the log says it can't create a file handle for mount dir, but why rdp has to switch to adminstrator? It works localy without admin right.

Logs

Dokan: debug mode on Dokan: use stderr AllocationUnitSize: 512 SectorSize: 512 device opened Dokan Error: CreateFile failed \.\Volume{d6cc17c5-1758-4085-bce7-964f1e9f5de9}: 5 Dokan Error: CreateFile failed \.\Volume{d6cc17c5-1758-4085-bce7-964f1e9f5de9}: 5 Dokan Error: CreateFile failed \.\Volume{d6cc17c5-1758-4085-bce7-964f1e9f5de9}: 5 Dokan Error: CreateFile failed \.\Volume{d6cc17c5-1758-4085-bce7-964f1e9f5de9}: 5 Dokan Error: CreateFile failed \.\Volume{d6cc17c5-1758-4085-bce7-964f1e9f5de9}: 5 Dokan Error: CreateFile failed \.\Volume{d6cc17c5-1758-4085-bce7-964f1e9f5de9}: 5 Dokan Error: CreateFile failed \.\Volume{d6cc17c5-1758-4085-bce7-964f1e9f5de9}: 5 Dokan Error: CreateFile failed \.\Volume{d6cc17c5-1758-4085-bce7-964f1e9f5de9}: 5 Dokan Error: CreateFile failed \.\Volume{d6cc17c5-1758-4085-bce7-964f1e9f5de9}: 5 CreateMountPoint D:\mount -> \??\Volume{d6cc17c5-1758-4085-bce7-964f1e9f5de9}\ success Dokan Error: CreateFile failed \.\Volume{d6cc17c5-1758-4085-bce7-964f1e9f5de9}: 5 mounted: D:\mount -> \Volume{d6cc17c5-1758-4085-bce7-964f1e9f5de9} Mounted Unmount

unload send global release for D:\mount DokanError: Ioctl failed with code 122 Failed to unmount: D:\mount

Mount using Mirror is also unavailable without adminstrator right, log is like:

[Mirror] Failed to add security privilege to process => GetFileSecurity/SetFileSecurity may not work properly => Please restart mirror sample with administrator rights to fix it

And it is also available to mount in a admin cmd

Liryna commented 1 year ago

Hi @Lucasq11 ,

What mirror param are you using ? It looks like the current user do not have access to open the device that was created for the mount instance. Is it a fresh Windows install ? Could it be that an application block the access of the device (antivirus etc)

Lucasq11 commented 1 year ago

I used mirror.exe /r C:\Users /l C:\mount01

Liryna commented 1 year ago

Is it a fresh Windows install ? Could it be that an application block the access of the device (antivirus etc)

Have you tried with dokan 2 ?

Lucasq11 commented 1 year ago

I think it is due to antivirus back ground process, thanks.

Lucasq11 commented 1 year ago

I'd like to try it with dokan 2 in the furture too.