Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to Mount only UNC without Drive #879

Open
4 of 5 tasks
zastrowm opened this issue Apr 2, 2020 · 6 comments
Open
4 of 5 tasks

Ability to Mount only UNC without Drive #879

zastrowm opened this issue Apr 2, 2020 · 6 comments

Comments

@zastrowm
Copy link

zastrowm commented Apr 2, 2020

Is there way to mount a filesystem without a drive/drive-letter? I'd like to do something like:

mirror.exe /r C:\MyFiles\ /u \localhost\myfs

where no drive letter is assigned - i.e. you can only access it via \\localhost\myfs instead of H:\. I think that's what this question was asking about, but I unable to determine if that's possible and I just haven't discovered how, or if it's not currently possible.

Environment

  • Windows version: Windows 10, 1909
  • Processor architecture: x64
  • Dokany version: 1.3.1.10000
  • Library type (Dokany/FUSE): Dokany

Check List

  • I checked my issue doesn't exist yet
  • My issue is valid with mirror default sample and not specific to my user-mode driver implementation
  • I can always reproduce the issue with the provided description below.
  • I have updated Dokany to the latest version and have reboot my computer after.
  • I tested one of the last snapshot from appveyor CI

Description

@Liryna
Copy link
Member

Liryna commented Apr 2, 2020

@zastrowm Hi,

Unfortunately that is not currently the case. Could you explain your case not want at all having the drive visible?

@zastrowm
Copy link
Author

zastrowm commented Apr 2, 2020

I have an application that discovers devices dynamically while it is open; if a device requires a password, the application prompts the user. While it's up, I'd like to be able to allow the user to browse the file systems of the device, using the open file dialog (for instance) or just windows explorer.

In general, I'd rather the user not have drives appear and disappear as the application launches.

@Liryna
Copy link
Member

Liryna commented Apr 3, 2020

You can make the filesystem only usable from specific applications by filtering processid during CreateFile and return access denied when appropriate.
The device will be visible but not accessible.

@zastrowm
Copy link
Author

zastrowm commented Apr 6, 2020

Yep - it's specifically the making the device visible that I'm trying to avoid.

Is it worth filing a feature request for it, or is this something that isn't even possible?

@Liryna
Copy link
Member

Liryna commented Apr 6, 2020

@zastrowm It is always good to have all the possibilities but I have doubt technically. It would need to mount a drive without having symbolic link with driver letter but still have the network redirector providing the full device path.

You can create the feature but it will not be a priority for now unless a good number of people are interested in it or a pull request <3

@Liryna
Copy link
Member

Liryna commented Apr 15, 2020

@adropit @zastrowm by default the mirror has M as MountPoint if /l is not specified.
https://github.com/dokan-dev/dokany/blob/master/samples/dokan_mirror/mirror.c#L77

Have you tried to call the mirror with /l "" like mirror.exe /r C:\MyFiles\ /l "" /u \localhost\myfs
https://github.com/dokan-dev/dokany/blob/master/samples/dokan_mirror/mirror.c#L1580-L1581
If it do not work, try to change the mirror to force an empty value.

Looking at the code only the mirror is doing a check to force MountPoint usage. Even if I believe you might get some issue later but lets start little by little.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants