Harsha G V
Harsha G V

Reputation: 1030

aws-cli 2 permission denied error in linux after installation

Getting permission denied error after installing aws-cli version using the official AWS guide while running aws --version

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

Upvotes: 7

Views: 12359

Answers (2)

blim747
blim747

Reputation: 81

What helped me here was I wasn't following the AWS provided instructions exactly. I tried curl-ing the .zip file into a different directory and unzipping it from there. The .zip file needs to be in the root directory for proper installation. FWIW I was installing using a Dockerfile with an Ubuntu Jammy base image.

Upvotes: 0

Harsha G V
Harsha G V

Reputation: 1030

Fix to this issue would be to provide the right set of file permissions to aws-cli.

which aws            # Find the path of aws-cli, say /usr/local/aws-cli/

sudo chmod -R 755 /usr/local/aws-cli/

Upvotes: 20

Related Questions