I'm trying to download files to a vm running CentOS on azure. The linux box has azcopy
installed. I'm trying to download files from azure file storage using a generated SAS token, but its failing to download. Am I misunderstanding how to use the SAS token?
Ultimately I was able to download the file using the key instead of the SAS token. So I know the url was correct.
I created a sas token for the storage account with the public ip of the linux vm, then copied and appended that to the file url. I've created a CORS rule for allowing all ip addresses. I repeated this on my local machine (with its public ip) and was able to get the file. When I run the same command on the vm it fails.
I tried running this with the sas token appended to the url, and passing it in as a separate param.
azcopy --source "https://mynamehere.file.core.windows.net/pathtofile/file" --source-sas "?sv=2018-03-28&ss=...&srt =...&sp=...&se=2019-04-04T21:53:38Z&st=2019-04-04T13:53:38Z&sip=...&spr=https&sig=..." --destination file --verbose
I keep getting
[VERBOSE] Location 'Cloud file: https://mynamehere.file.core.windows.net/pathtofile/file' does not exist, This request is not authorized to perform this operation.
HttpStatusMessage:This request is not authorized to perform this operation.
and
[ERROR] Error parsing source location "https://mynamehere.file.core.windows.net/pathtofile/file": Source with location type File doesn't exist.