karmafeast / windows_smb

puppet module for managing smb shares, smb server / client settings on windows systems
Apache License 2.0
3 stars 4 forks source link

Windows explorer doesn't show that a folder is shared when using forward slashes for smb_share_directory. #2

Closed dhs-rec closed 2 months ago

dhs-rec commented 7 years ago

Hi, I've just shared a directory using this Puppet module. Sharing works fine and I can access the share from remote.

However, on the sharing server, if I right-click the shared folder and select "Properties -> Sharing", it still shows "Not shared", although it is.

dhs-rec commented 7 years ago

OK, got it: I was using forward slashes in "smb_share_directory". Changing those to backslashes made the sharing information appear in the folder properties. Maybe a check should be added.

Changing title...

dhs-rec commented 4 years ago

So, has a check for backslashes been added?

karmafeast commented 4 years ago

Okokok.

I'll have a shot at re-upping this module, we'll get the nasty powershell embedded block templated and while I'm at it I'll see about your back slashes.

It would be useful to me to have an example of input data that will cause the issue you see with backslahes vs slashes.

karmafeast commented 4 years ago

There are oddities with the powershell backend that I may not be able to avoid, or at least there were when I wrote this.

When I say oddities, I dimly recall 'invisible ahares' if the input was malformed from its perspective, relating to win explorer display.

Hoping at the very least I can sanitize puppet practitioner input and correct mixed use of forward and back slashes.

A unc path is constructed with backslahes in windows world (for back compatibility with ancient dos), but there's no reason this module can't take whatever you put and coax that into an acceptable format for use.

dhs-rec commented 4 years ago

That's been 3 years back. I'm afraid we're not needing this anymore by now. But from what I've written above, I'd guess I've used something like smb_share_directory => 'C:/path/to/folder', instead of the correct smb_share_directory => 'C:\path\to\folder',.

roberteckdale commented 4 years ago

Just an FYI: I've seen this behavior when configuring SMB shares using the Puppet DSC module. While Windows Explorer doesn't appear to be 'aware' of the share when looking at the 'Sharing' property sheet of the directory in question, you will find the share in Computer Management > Shared folders > Shares.