cyberark / KubiScan

A tool to scan Kubernetes cluster for risky permissions
GNU General Public License v3.0
1.31k stars 130 forks source link

'docker_run.sh' script returning permission denied error when trying to copy into the container #44

Closed 2niknatan closed 2 years ago

2niknatan commented 2 years ago

Summary

When running 'docker_run.sh' script, the 'docker cp' command is returning an error as such: ERRO[0000] Can't add file /root/.minikube/profiles/minikube/client.crt to tar: open /root/.minikube/profiles/minikube/client.crt: permission denied

Steps to Reproduce

  1. Running 'docker_run.sh' script

Expected Results

All files are copied

Actual Results

Getting 'When running 'docker_run.sh' script, the 'docker cp' command is returning an error as such: ERRO[0000] Can't add file /root/.minikube/profiles/minikube/client.crt to tar: open /root/.minikube/profiles/minikube/client.crt: permission denied' error

Reproducible

Environment setup

Ubuntu

2niknatan commented 2 years ago

After some research, I ran 'sudo snap install docker' command. This command has some limitations on docker such as:

- This build can only access files in the home directory. So Dockerfiles and all other files used in commands like docker build, docker save and docker load need to be in $HOME.