Skip to content

split fails: error: write /dev/stdout: permission denied #14

Closed

Description

@jglick
$ kubectl konfig split microk8s
error: write /dev/stdout: permission denied

Linux. kubectl 1.17.3 from Snap. Plugin v0.2.2.

Activity

  1. corneliusweig commented on Mar 31, 2020

    @corneliusweig
    Owner

    Hmm.. curious. Can you export NDEBUG=y and show the log output?
    It could very well be a snap problem which I won't be able to reproduce, so if you want to investigate further that would be great.

  2. jglick commented on Apr 1, 2020

    @jglick
    Author

    Can you export NDEBUG=y and show the log output?

    Does not produce any additional output.

    It could very well be a snap problem

    Indeed it seems that way—works when using a manually downloaded kubectl. This snap uses “classic confinement”, which generally means it should behave like a plain package (I have not encountered any permission-related errors in any other usage), but maybe there is some subtle difference here.

  3. Routhinator commented on May 6, 2020

    @Routhinator

    Also seeing this with the snap version of kubectl. However I get it with the import command:

    kubectl konfig import -s kubeconf2.yaml 
    error: write /dev/stdout: permission denied
    
  4. corneliusweig commented on Jun 1, 2020

    @corneliusweig
    Owner

    This is a snap problem. There's nothing I can do to konfig to improve this situation.
    FWIW, this seems related: moby/moby#31243 (comment)

  5. jglick commented on Jun 2, 2020

    @jglick
    Author

    What code here is actually trying to use /dev/stdout? I do not see any in this repo. Is it something being called by this script? Most uses of /dev/stdout can be replaced (a bit awkwardly) with temp files.

  6. guettli commented on Mar 8, 2023

    @guettli

    this could be related to an issue of snap: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1849753

  7. jglick commented on Mar 8, 2023

    @jglick
    Author

    Indeed. https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1849753/comments/26 suggests a workaround: replace

    kubectl … > "$tmpcfg"

    with the rather cryptic

    kubectl … > >(cat > "$tmpcfg")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions