Azure-storage-azcopy: Copy local to Azure Blob Storage with Write-only SAS

Created on 18 May 2019  路  4Comments  路  Source: Azure/azure-storage-azcopy

This used to work with AzCopy 7.x with "force" flag.

Windows 10 x64, AzCopy 10.1.2

Scenario: I created a _write only_ SAS and gave it to a client. He runs AzCopy with that SAS token for a blob container to copy a huge file. But Azure fails to authenticate the request. Is there any parameter to "force" AzCopy?

Most helpful comment

Note on recent versions of azcopy --check-length=false is also required to avoid an upload failure on write-only SAS tokens.

All 4 comments

Hi, alvipeo, could you please edit your issue to provide the commands you executed in order to reproduce this? Thanks!

"G:\azcopy_windows_amd64_10.1.2\azcopy.exe" .\huge-file.mp4 https://account.blob.core.windows.net/video?st=2019-05-16T23%3A17%3A00Z&se=2019-05-19T23%3A17%3A00Z&sp=w&sv=2018-03-28&sr=c&sig=REDACTED  --overwrite=false --follow-symlinks --recursive --from-to=LocalBlob --blob-type=BlockBlob

Alex, I think I see the problem. If you remove --overwrite=false I think it will work.

V10 defaults to overwrite=true, which is similar to v7's force. With v7's force, or v10's default of overwrite=true, write access should be fine because it doesn't need to read to see if the file is already there.

But with overwrite=false, it has to read to see if the blob is already there. Hope that makes sense.

Note on recent versions of azcopy --check-length=false is also required to avoid an upload failure on write-only SAS tokens.

Was this page helpful?
0 / 5 - 0 ratings