Skip to content

Commands fail when cd to a file share on windows #4990

Closed

Description

When working on a file share simple commands fail with Cannot find path error message.

Steps to reproduce

cd \\someactual\fileshare\path

ls

rm *.zip

cd ..\another_path

Expected behavior

Changes working directory to file share path.

Lists the contents of the directory.

Removes any .zip file

Changes directory to another path on the share.

Actual behavior

Changes working directory to file share path.

ls : Cannot find path '\someactual\fileshare\path' because it does not exist.
At line:1 char:1
+ ls
+ ~~
    + CategoryInfo          : ObjectNotFound: (\amcd12f02\devgp\releases\1.dev:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

Same Cannot find path error for all commands.

Environment data

> $PSVersionTable


Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
GitCommitId                    v6.0.0-beta.7
OS                             Microsoft Windows 6.1.7601 S
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Activity

  1. KexyBiscuit commented on Oct 3, 2017

    @KexyBiscuit

    It does not repro on Windows PowerShell 5.1, but it does repro on PowerShell 6.0.0-beta.7.

  2. added
    WG-Engine-Providers
    on Oct 3, 2017
  3. SteveL-MSFT commented on Oct 3, 2017

    @SteveL-MSFT
    Member

    This doesn't repro for me on Win10 and PSCore6 beta.7.

    PowerShell v6.0.0-beta.7
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    PS C:\> cd \\share\scratch\steve
    PS Microsoft.PowerShell.Core\FileSystem::\\share\scratch\steve>
  4. SteveL-MSFT commented on Oct 3, 2017

    @SteveL-MSFT
    Member

    Does the current logged on user have permission to the share and the folder?

  5. roberocity commented on Oct 3, 2017

    @roberocity
    Author

    Yes, the user has permission to access the share. The user can run utility from a power shell prompt that reads the files in the directory, manipulates, and saves them again. That works as expected, but the user can't then cd to another folder on the share.

    OS is Windows 7 Enterprise.

  6. SteveL-MSFT commented on Oct 3, 2017

    @SteveL-MSFT
    Member

    Ok, there's definitely some regression here. Although I can cd into the folder on the share, dir fails saying \share\scratch\steve doesn't exist (notice the missing slash from the front)

  7. changed the title [-]Commands file when cd to a file share on windows[/-] [+]Commands fail when cd to a file share on windows[/+] on Oct 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Resolution-FixedWG-Engine-Providers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions