Search code examples
amazon-web-servicesaws-cli

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

Solution

  • 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/