winfsp / sshfs-win

SSHFS For Windows
https://winfsp.dev
Other
4.8k stars 251 forks source link

Random "Access denied" message creating files or directories when run CMD as admin, but operation is done anyway #186

Open nrs1022 opened 4 years ago

nrs1022 commented 4 years ago

Running as Admin an app and working with the mapped network drive through Explorer causes random "Access denied" messages creating files or directories, but operation is done anyway.

Steps: 1- Mount a SSHFS drive with Explorer. 2- Open CMD as Admin 3- Go to the mapped drive and try to create a nonexistant folder: mkdir example

"Access denied" is shown, but example dir is created anyway.

Tested on: Windows 10 (10.0.18363.778) and SSHFS 3.5.20024, WinFSP 2020.

Thank you! P.S. Awesome work! SSHFS-Win and WinFSP are great!

billziss-gh commented 4 years ago

I believe the problem is that the file system is setup to be fully accessible from the user who "maps network drive" from the Explorer.

When running a command prompt as Admin some permissions may be missing, which is why you get "Access Denied", but you still have most permissions so the operation succeeds anyway.

Is there a need for you to use the file system both as a regular user and as an Administrator?

nrs1022 commented 4 years ago

No, isn't really a big issue for me. I have several scripts saved on my network dir, some of them needs to be run as Admin but knowing about this issue I can workaround it. Previously I've used samba shares (on the same server) to store the scripts, but SSHFS is very fast and outperforms Samba. Note problem is about creating files or directories. Modifying files seems to work fine (No problems detected up to now). It's just a little annoying issue, because you can see operation is successful (You can see the file or the folder created on server). Thank you for share your great work!!!

netheril96 commented 3 months ago

I believe the problem is that the file system is setup to be fully accessible from the user who "maps network drive" from the Explorer.

When running a command prompt as Admin some permissions may be missing, which is why you get "Access Denied", but you still have most permissions so the operation succeeds anyway.

Is there a need for you to use the file system both as a regular user and as an Administrator?

I have this needs lately. I need to install something onto a sshfs mount, but the installer insists being run as Admin.