-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Storage] az storage copy: Stop granting stat.S_IWUSR permission for azcopy installation dir
#26108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
… installation dir
️✔️acr
️✔️acs
️✔️advisor
️✔️ams
️✔️apim
️✔️appconfig
️✔️appservice
️✔️aro
️✔️backup
️✔️batch
️✔️batchai
️✔️billing
️✔️botservice
️✔️cdn
️✔️cloud
️✔️cognitiveservices
️✔️config
️✔️configure
️✔️consumption
️✔️container
️✔️core
️✔️cosmosdb
️✔️databoxedge
️✔️dla
️✔️dls
️✔️dms
️✔️eventgrid
️✔️eventhubs
️✔️feedback
️✔️find
️✔️hdinsight
️✔️identity
️✔️iot
️✔️keyvault
️✔️kusto
️✔️lab
️✔️managedservices
️✔️maps
️✔️marketplaceordering
️✔️monitor
️✔️netappfiles
️✔️network
️✔️policyinsights
️✔️privatedns
️✔️profile
️✔️rdbms
️✔️redis
️✔️relay
️✔️resource
️✔️role
️✔️search
️✔️security
️✔️servicebus
️✔️serviceconnector
️✔️servicefabric
️✔️signalr
️✔️sql
️✔️sqlvm
️✔️storage
️✔️synapse
️✔️telemetry
️✔️util
️✔️vm
|
|
Hi @evelyn-ys, |
|
Storage |
| except PermissionError as err: | ||
| raise CLIError(f'Permission error while attempting to download azcopy to {install_dir}. ' | ||
| f'You could install the specified azcopy version {AZCOPY_VERSION} manually or ' | ||
| f'grant write permission and retry. ({err})') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PermissionError is thrown by
azure-cli/src/azure-cli/azure/cli/command_modules/storage/azcopy/util.py
Lines 213 to 214 in c0276ba
| with open(install_location, 'wb') as f: | |
| f.write(zip_file.read(fileName)) |
Guess it's better to capture it here?
|
BTW, there seems to be a bug in
It is then called again for Python 2:
The second from urllib.request import urlopen
req = urlopen('https://httpbin.org/get')
print(req.read())
print(req.read())Output: |
Related command
az storage copy/removeaz storage blob syncaz storage fs directory upload/downloadDescription
Revert #16814, #21714
We won't automatically add
stat.S_IWUSERpermission to azcopy installation directory any more. Customers have to make sure they have write permission by themselvesThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.