I have a SAS for container (WRITE only, but I tries READ-WRITE-LIST too). And I need to upload a single file to that container. So I use AzCopy for that:
AzCopy /Source:./ /Dest:https://account.blob.core.windows.net/container/?sv=2018-03-28&si=write&sr=c&sig=****** /Pattern:somefile.ext /V:./AzCopy.log
And I tried another version:
AzCopy /Source:somefile.ext /Dest:https://account.blob.core.windows.net/container/somefile.ext /DestSAS:******
but that doesn't work either.
And I tried both AzCopy versions - 7.1.3 and 8.1! What else should I try?
BTW, with Powershell it works like a charm, with the same SAS token! Windows 10 latest.
UPDATE
The log (made on completely different machine):
[2019.03.22 06:39:41.551+03:00] >>>>>>>>>>>>>>>> [2019.03.22 06:39:41.561+03:00][VERBOSE] Finished: 0 file(s), 0 B; Average Speed:0 B/s. [2019.03.22 06:39:41.569+03:00][VERBOSE] 8.1.0 : AzCopy /Source:somefile.ext /Dest:https://account.blob.core.windows.net/korch/somefile.ext /DestSAS:****** /V:./AzCopy with SAS.log [2019.03.22 06:39:41.589+03:00][ERROR] An error occurred while reading the restart journal from "C:\Users\user\AppData\Local\Microsoft\Azure\AzCopy". Detailed error: Error parsing the journal file: Journal file was generated by a different version of AzCopy. [2019.03.22 06:39:43.175+03:00][VERBOSE] [PROMPT] Do you want to overwrite the journal to start a new operation? Choose Yes to overwrite, choose No to cancel current operation. (Yes/No) : Y [2019.03.22 06:39:43.230+03:00][VERBOSE] Attempt to parse address 'somefile.ext' to a directory as a candidate location succeeded. [2019.03.22 06:39:43.232+03:00][VERBOSE] Attempt to parse address 'somefile.ext' to a single file as a candidate location succeeded. [2019.03.22 06:39:43.239+03:00][VERBOSE] Source is interpreted as a Local file: G:\1\somefile.ext. [2019.03.22 06:39:43.260+03:00][VERBOSE] Attempt to parse address 'https://account.blob.core.windows.net/korch/somefile.ext' to a directory as a candidate location succeeded. [2019.03.22 06:39:43.269+03:00][VERBOSE] Attempt to parse address 'https://account.blob.core.windows.net/korch/somefile.ext' to a single file as a candidate location succeeded. [2019.03.22 06:39:43.270+03:00][VERBOSE] Interpreting destination as a single file as the provided source is a single file. [2019.03.22 06:39:43.271+03:00][VERBOSE] Destination is interpreted as a Cloud blob: https://account.blob.core.windows.net/korch/somefile.ext. [2019.03.22 06:39:43.942+03:00][VERBOSE] Start transfer: G:\1\somefile.ext => https://account.blob.core.windows.net/korch/somefile.ext [2019.03.22 06:39:44.149+03:00][VERBOSE] Transfer FAILED: G:\1\somefile.ext => https://account.blob.core.windows.net/korch/somefile.ext. [2019.03.22 06:39:44.158+03:00][ERROR] An unknown error occurred: The transfer failed. Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. HttpStatusMessage:Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:76ffafce-901e-0132-6460-e00b82000000 Time:Fri, 22 Mar 2019 06:39:44 GMT [2019.03.22 06:39:44.161+03:00] Transfer summary: ----------------- Total files transferred: 1 Transfer successfully: 0 Transfer skipped: 0 Transfer failed: 1 Elapsed time: 00.00:00:02