[Storage] az storage copy: Stop granting stat.S_IWUSR permission for azcopy installation dir#26108
Draft
[Storage] az storage copy: Stop granting stat.S_IWUSR permission for azcopy installation dir#26108
az storage copy: Stop granting stat.S_IWUSR permission for azcopy installation dir#26108Conversation
… 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, |
Collaborator
|
Storage |
jiasli
reviewed
Apr 18, 2023
Comment on lines
+59
to
+62
| 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})') |
Member
There was a problem hiding this comment.
PermissionError is thrown by
azure-cli/src/azure-cli/azure/cli/command_modules/storage/azcopy/util.py
Lines 213 to 214 in c0276ba
Guess it's better to capture it here?
Member
|
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.