Skip to content

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

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

Closed
fcharlie opened this issue Jul 11, 2018 · 3 comments
Closed

Comments

@fcharlie
Copy link

fcharlie commented Jul 11, 2018

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.

@rjmholt
Copy link
Contributor

rjmholt commented Jul 11, 2018

I've opened a PR to fix this:
PowerShell/PowerShellEditorServices#698

@rjmholt
Copy link
Contributor

rjmholt commented Jul 11, 2018

@fcharlie Can you update your extension version to 1.8.1 and see if this is fixed?

@fcharlie
Copy link
Author

@rjmholt 1.8.1 is running

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

No branches or pull requests

2 participants