Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permission denied: '/home/ugurkaya/.aws/credentials'

Just installed awscli, and having issues with my configuration.

When I do aws configure :

AWS Access Key ID [None]: "ACCESS KEY HERE"
AWS Secret Access Key [None]: "SECRET KEY HERE"
Default region name [None]: us-east-1
Default output format [None]: 

[Errno 13] Permission denied: '/home/ugurkaya/.aws/credentials'

I also tried chmod +x /home/ugurkaya/.aws/credentials but did not help. Any ideas why am I having this issue?

Edit: ls -l ~/.aws/credentials output:

-rwx--x--x 1 root root 116 jul 13 18:12 /home/ugurkaya/.aws/credentials

like image 997
Uğur Kaya Avatar asked Sep 04 '25 16:09

Uğur Kaya


1 Answers

This is due to the /home/ugurkaya/.aws/credentials is under root permissions. You can change the permissions of these files to the user that you are using.

Use the following command for this.

    sudo chown -R $user:$user /home/ugurkaya/.aws/

This will change the permissions of the /home/ugurkaya/.aws/ folder and the contents of it to the current user that you are running the command. Make sure you replace the $user if you want to change the permission to another user.

like image 164
Kasun Piyasena Avatar answered Sep 07 '25 17:09

Kasun Piyasena



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!