azure-cli: Permission Denied on PKG-INFO file of azure_cosmos package

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug

Get a permission denied error on /usr/local/Cellar/azure-cli/2.6.0/libexec/lib/python3.8/site-packages/azure_cosmos-3.1.0-py3.8.egg-info/PKG-INFO

I manually resolved it and then when I invoke a command I get a series of warning messages having to do with conditional statements in Python 3.8.x (installed with azure-cli)

To Reproduce

Occurs on macOS 10.15.4

su admin brew install azure-cli az login

Expected behavior

No Permission Denied error No Python 3.8 warnings

Environment summary

azure-cli 2.6.0 macOS 10.15.4 zsh

Additional context

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 15 (3 by maintainers)

Most upvoted comments

@nrobert The azure-cosmos package is upgraded in this PR and is targeted to be released on August 25 with 2.11.0.

This also occurred for me on azure-cli 2.9.1 on macOS 10.15.6 installed with Homebrew 2.4.8.

The installation was performed using a different user account (with administrator privileges) than the user who is running the az command. (Although it’s not technically about administrator rights per se, it’s about the files below being owned by the installation user and unreadable by anyone else.)

Other files in /usr/local/Cellar/azure-cli/2.9.1/libexec/lib/python3.8/site-packages/ have the permissions set to -rw-r--r-- (0644), but the following files are set to -rw------- (600):

% cd /usr/local/Cellar/azure-cli/2.9.1/libexec/lib/python3.8/site-packages    
% find . -perm 600
./azure_cosmos-3.1.0-py3.8.egg-info/PKG-INFO
./azure_cosmos-3.1.0-py3.8.egg-info/SOURCES.txt
./azure_cosmos-3.1.0-py3.8.egg-info/requires.txt
./azure_cosmos-3.1.0-py3.8.egg-info/top_level.txt
./azure_cosmos-3.1.0-py3.8.egg-info/dependency_links.txt

One or more of these files are attempted to be read upon running az, so therefore no user other than the installation user can execute az unless these permissions are manually changed.

Same problem on my side since updated Python to 3.8 and az-cli, with brew