Skip to content

"Permission denied !" on a binary that has permission !  #5103

Closed

Description

while doing this PR to add podman as a driver to minikube (which will run a systemd inside a container using podman)
kubernetes/minikube#6515

I noticed the binary files that minikube copies into the podman container, are not executable.

root@minikube:/var/lib/minikube/binaries/v1.17.2# ./kubectl
bash: ./kubectl: Permission denied
# ls -lah kubectl
-rwxrwxrwx 1 root root 42M Jan 21 18:07 kubectl

because I had other issues with podman cp command
I decided to go into the container myself and use wget to download them and then chmod +x manually but I still get permission denied !!!

this seems to be the only blocker to add run minikube in podman and I would appreciate any help on this

sudo podman exec -it minikube /bin/bash

root@minikube:/var/lib/minikube/binaries/v1.17.2# wget https://storage.googleapis.com/kubernetes-release/release/v1.17.2/bin/linux/amd64/kubectl
 41.48M   223MB/s    in 0.2s
2020-02-06 07:53:03 (223 MB/s) - 'kubectl' saved [43491328/43491328]

root@minikube:/var/lib/minikube/binaries/v1.17.2# chmod +x kubectl
root@minikube:/var/lib/minikube/binaries/v1.17.2# ./kubectl
bash: ./kubectl: Permission denied
root@minikube:/var/lib/minikube/binaries/v1.17.2# chmod a+x kubectl
root@minikube:/var/lib/minikube/binaries/v1.17.2# ./kubectl
bash: ./kubectl: Permission denied

it worth noting that minikube creates the container with --cgroup-manager cgroupfs
and --privileged and with sudo
(unlike docker it doesn't let me create my container without sudo)

versions :
$ podman version
Version: 1.7.0
RemoteAPI Version: 1
Go Version: go1.12.10
OS/Arch: linux/amd64

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions