Azure CLI ‘az login’ returns ‘Permission denied’

I recently encountered a fresh install of the Azure CLI on Ubuntu 18.04 LTS that failed at ‘az login’ step with the following error:

[Errno 13] Permission denied: ‘/home/pzerger/.azure/config

When I looked at permissions on the directory with the command below, I saw that my account simply lacked write and execute permisions.

 
ls -la /home/pzerger/.azure/

The Fix

To resolve the issue, I simply ran chmod to grant my account permissions, as shown below.

 
sudo chmod -R 777 /home/pzerger/.azure/config
sudo chmod -R 777 /home/pzerger/.azure

As soon as I did this ‘az login’ worked as designed.

Print Friendly, PDF & Email

Leave a Reply