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

Mount resource does not support spaces in Windows mount points #2276

Closed
charlesjohnson opened this issue Oct 22, 2014 · 7 comments
Closed

Mount resource does not support spaces in Windows mount points #2276

charlesjohnson opened this issue Oct 22, 2014 · 7 comments
Labels
Platform: Windows Type: Bug Does not work as expected.

Comments

@charlesjohnson
Copy link

Consider:

mount 't:'
  source '\\\\server\\aPathWithoutSpaces\\a path with spaces'
  action :mount
end

This resource will fail with 'ArgumentError: The network location cannot be reached.'

On the other hand, this will work:

mount 't:'
  source '\\\\server\\aPathWithoutSpaces'
  action :mount
end
@lamont-granquist
Copy link
Contributor

We'll need the full backtrace

@adamedx
Copy link
Contributor

adamedx commented Oct 22, 2014

I'm looking at it and will update -- turns out it may not be spaces, but the fact that we were traversing a reparse point on DFS share, and the permissions were... odd. If you mount the drive to a drive letter, you can't get list files permission on some directories (even with cmd.exe / powershell, no ruby involved).

@smurawski
Copy link
Contributor

Windows team (@btm @jdmundrawala @ksubrama) - is this on the backlog? @charlesjohnson is this a blocker or just a bug you tracked down?

@jaym
Copy link
Contributor

jaym commented Jan 19, 2015

Have not seen it on our backlog

@charlesjohnson
Copy link
Author

As this was several months ago I don't recall vividly, but it was a "bug we encountered while team programming at MS with a customer and @adamedx." I think @adamedx 's update is correct, in that it was a reparse point on the DFS share with odd permissions, but it would need further clarification. It's possible both odd permissions from reparse AND spaces were an issue.

@adamedx
Copy link
Contributor

adamedx commented Jan 20, 2015

Yeah, I think we can just warn and doc -- the equivalent shell command of ls \\server\apathwithoutspaces also failed. Having a UNC path with more than two components (i.e. \server\share) was actually a new addition in Windows 2000 (not supported prior to that). I'm guessing there are some strange things with inheritance of permissions if you go beyond that. Given that the scenario doesn't work with native API's and tools, I think we should help users be successful -- give a warning to mount just at the level of \\server\share, or maybe only show the warning if we actually fail, i.e. a specialized error message. Should be easy enough to unit test. Feel free to add to the backlog.

@thommay
Copy link
Contributor

thommay commented May 27, 2015

This is expected behaviour on Windows, so there's not an awful lot we can do here.

@thommay thommay closed this as completed May 27, 2015
@thommay thommay added Type: Bug Does not work as expected. and removed Bug labels Jan 25, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Windows Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

8 participants