Skip to content

v1.8.0: Permissions to the pipe file were not set properly cannot start #1421

@fcharlie

Description

@fcharlie

System Details

  • Operating system name and version:
  • VS Code version:
  • PowerShell extension version:
  • Output from $PSVersionTable:
Copy / paste the following commands into the PowerShell Integrated Console, and paste the output here:

code -v

1.25.0
0f080e5267e829de46638128001aeb7ca2d6d50e
x64

$pseditor.EditorServicesVersion
**NOT START**

code --list-extensions --show-versions

[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]


$PSVersionTable


Name                           Value
----                           -----
PSVersion                      6.1.0-preview.3
PSEdition                      Core
GitCommitId                    v6.1.0-preview.3
OS                             Linux 4.15.0-24-generic #26-Ubuntu SMP Wed Jun 13 08:44:47 UTC 2018
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0



Issue Description

I am experiencing a problem with...

Attached Logs

Follow the instructions in the README
about capturing and sending logs.

Permissions to the pipe file were not set properly. Expected: 600 Actual: srw------- forfile: /tmp/CoreFxPipe_PSES_5528b497-d670-4c6d-8aa3-252f2210aaae
>file /tmp/CoreFxPipe_PSES_5528b497-d670-4c6d-8aa3-252f2210aaae
/tmp/CoreFxPipe_PSES_5528b497-d670-4c6d-8aa3-252f2210aaae socket

>ls -l /tmp/CoreFxPipe_PSES_5528b497-d670-4c6d-8aa3-252f2210aaae
srw-------

./modules/PowerShellEditorServices/Start-EditorServices.ps1:233:

function Set-NamedPipeMode {
    param(
        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [string]
        $PipeFile
    )
    chmod $DEFAULT_USER_MODE $PipeFile
    if ($IsLinux) {
        $mode = stat -c "%A" $PipeFile
    }
    else {
        $mode = stat -f "%A" $PipeFile
    }
    if ($mode -ne $DEFAULT_USER_MODE) {
        ExitWithError "Permissions to the pipe file were not set properly. Expected: $DEFAULT_USER_MODE Actual: $mode for file: $PipeFile"
    }
}

command stat format error:

function Set-NamedPipeMode {
    param(
        [Parameter(Mandatory=$true)]
        [ValidateNotNullOrEmpty()]
        [string]
        $PipeFile
    )
    chmod $DEFAULT_USER_MODE $PipeFile
    if ($IsLinux) {
        $mode = stat -c "%a" $PipeFile
    }
    else {
        $mode = stat -f "%A" $PipeFile
    }
    if ($mode -ne $DEFAULT_USER_MODE) {
        ExitWithError "Permissions to the pipe file were not set properly. Expected: $DEFAULT_USER_MODE Actual: $mode for file: $PipeFile"
    }
}

https://github.com/PowerShell/PowerShellEditorServices/blob/master/module/PowerShellEditorServices/Start-EditorServices.ps1#L227

Rollback to 1.7 start ext success.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions