Copying individual files to Azure Blob storage

Hi!

I’m not sure whether it’s a bug, or I’m doing something wrong. I can successfully upload file to Azure Blob storage if I’m specifying directory in which file(s) in question resides, but I get authorization failure if I try to upload it using filename as an individual file

Check this out -

user@host:/tmp$ ls -la data/1/2/3/4/5/12345
-rw-rw-r-- 1 user group 1048576000 Jan 18 22:16 data/1/2/3/4/5/12345
user@host:/tmp$ rclone copy data azureblob:blobcontainerfoo
user@host:/tmp$ rclone ls azureblob:blobcontainerfoo
1048576000 1/2/3/4/5/12345
user@host:/tmp$ rclone copy data/1/2/3/4/5 azureblob:blobcontainerfoo
user@host:/tmp$ rclone ls azureblob:blobcontainerfoo
1048576000 12345
1048576000 1/2/3/4/5/12345
user@host:/tmp$ rclone delete azureblob:blobcontainerfoo/12345
user@host:/tmp$ rclone ls azureblob:blobcontainerfoo
1048576000 1/2/3/4/5/12345
user@host:/tmp$ rclone copy data/1/2/3/4/5/12345 azureblob:blobcontainerfoo
2019/01/18 23:47:31 ERROR : 12345: Failed to copy: failed to make container: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:33479cf1-001e-000a-4688-affc0a000000
Time:2019-01-18T23:47:31.0584908Z, Details:
Code: AuthorizationFailure
PUT
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2019-01-22&sig=REDACTED&sp=rwdl&sr=c&sv=2018-03-28&timeout=31536001
User-Agent: [Azure-Storage/0.3 (go1.11.2; linux)]
X-Ms-Client-Request-Id: [9238118c-9b82-4be3-6603-4d745e351427]
X-Ms-Version: [2018-03-28]

RESPONSE Status: 403 This request is not authorized to perform this operation.
Content-Length: [246]
Content-Type: [application/xml]
Date: [Fri, 18 Jan 2019 23:47:30 GMT]
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
X-Ms-Error-Code: [AuthorizationFailure]
X-Ms-Request-Id: [33479cf1-001e-000a-4688-affc0a000000]
X-Ms-Version: [2018-03-28]

2019/01/18 23:47:31 ERROR : Attempt 1/3 failed with 1 errors and: failed to make container: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:33479cf1-001e-000a-4688-affc0a000000
Time:2019-01-18T23:47:31.0584908Z, Details:
Code: AuthorizationFailure
PUT
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2019-01-22&sig=REDACTED&sp=rwdl&sr=c&sv=2018-03-28&timeout=31536001
User-Agent: [Azure-Storage/0.3 (go1.11.2; linux)]
X-Ms-Client-Request-Id: [9238118c-9b82-4be3-6603-4d745e351427]
X-Ms-Version: [2018-03-28]

RESPONSE Status: 403 This request is not authorized to perform this operation.
Content-Length: [246]
Content-Type: [application/xml]
Date: [Fri, 18 Jan 2019 23:47:30 GMT]
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
X-Ms-Error-Code: [AuthorizationFailure]
X-Ms-Request-Id: [33479cf1-001e-000a-4688-affc0a000000]
X-Ms-Version: [2018-03-28]

2019/01/18 23:47:31 ERROR : 12345: Failed to copy: failed to make container: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:33479d0d-001e-000a-5d88-affc0a000000
Time:2019-01-18T23:47:31.1055232Z, Details:
Code: AuthorizationFailure
PUT
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2019-01-22&sig=REDACTED&sp=rwdl&sr=c&sv=2018-03-28&timeout=31536001
User-Agent: [Azure-Storage/0.3 (go1.11.2; linux)]
X-Ms-Client-Request-Id: [0f08a7f8-060f-4fb5-6547-8459719eaecd]
X-Ms-Version: [2018-03-28]

RESPONSE Status: 403 This request is not authorized to perform this operation.
Content-Length: [246]
Content-Type: [application/xml]
Date: [Fri, 18 Jan 2019 23:47:30 GMT]
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
X-Ms-Error-Code: [AuthorizationFailure]
X-Ms-Request-Id: [33479d0d-001e-000a-5d88-affc0a000000]
X-Ms-Version: [2018-03-28]

2019/01/18 23:47:31 ERROR : Attempt 2/3 failed with 1 errors and: failed to make container: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:33479d0d-001e-000a-5d88-affc0a000000
Time:2019-01-18T23:47:31.1055232Z, Details:
Code: AuthorizationFailure
PUT
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2019-01-22&sig=REDACTED&sp=rwdl&sr=c&sv=2018-03-28&timeout=31536001
User-Agent: [Azure-Storage/0.3 (go1.11.2; linux)]
X-Ms-Client-Request-Id: [0f08a7f8-060f-4fb5-6547-8459719eaecd]
X-Ms-Version: [2018-03-28]

RESPONSE Status: 403 This request is not authorized to perform this operation.
Content-Length: [246]
Content-Type: [application/xml]
Date: [Fri, 18 Jan 2019 23:47:30 GMT]
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
X-Ms-Error-Code: [AuthorizationFailure]
X-Ms-Request-Id: [33479d0d-001e-000a-5d88-affc0a000000]
X-Ms-Version: [2018-03-28]

2019/01/18 23:47:31 ERROR : 12345: Failed to copy: failed to make container: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:33479d26-001e-000a-7288-affc0a000000
Time:2019-01-18T23:47:31.1485541Z, Details:
Code: AuthorizationFailure
PUT
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2019-01-22&sig=REDACTED&sp=rwdl&sr=c&sv=2018-03-28&timeout=31536001
User-Agent: [Azure-Storage/0.3 (go1.11.2; linux)]
X-Ms-Client-Request-Id: [7a87582a-a271-497d-4106-0f698a159222]
X-Ms-Version: [2018-03-28]

RESPONSE Status: 403 This request is not authorized to perform this operation.
Content-Length: [246]
Content-Type: [application/xml]
Date: [Fri, 18 Jan 2019 23:47:30 GMT]
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
X-Ms-Error-Code: [AuthorizationFailure]
X-Ms-Request-Id: [33479d26-001e-000a-7288-affc0a000000]
X-Ms-Version: [2018-03-28]

2019/01/18 23:47:31 ERROR : Attempt 3/3 failed with 1 errors and: failed to make container: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:33479d26-001e-000a-7288-affc0a000000
Time:2019-01-18T23:47:31.1485541Z, Details:
Code: AuthorizationFailure
PUT
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2019-01-22&sig=REDACTED&sp=rwdl&sr=c&sv=2018-03-28&timeout=31536001
User-Agent: [Azure-Storage/0.3 (go1.11.2; linux)]
X-Ms-Client-Request-Id: [7a87582a-a271-497d-4106-0f698a159222]
X-Ms-Version: [2018-03-28]

RESPONSE Status: 403 This request is not authorized to perform this operation.
Content-Length: [246]
Content-Type: [application/xml]
Date: [Fri, 18 Jan 2019 23:47:30 GMT]
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
X-Ms-Error-Code: [AuthorizationFailure]
X-Ms-Request-Id: [33479d26-001e-000a-7288-affc0a000000]
X-Ms-Version: [2018-03-28]

2019/01/18 23:47:31 Failed to copy: failed to make container: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:33479d26-001e-000a-7288-affc0a000000
Time:2019-01-18T23:47:31.1485541Z, Details:
Code: AuthorizationFailure
PUT
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2019-01-22&sig=REDACTED&sp=rwdl&sr=c&sv=2018-03-28&timeout=31536001
User-Agent: [Azure-Storage/0.3 (go1.11.2; linux)]
X-Ms-Client-Request-Id: [7a87582a-a271-497d-4106-0f698a159222]
X-Ms-Version: [2018-03-28]

RESPONSE Status: 403 This request is not authorized to perform this operation.
Content-Length: [246]
Content-Type: [application/xml]
Date: [Fri, 18 Jan 2019 23:47:30 GMT]
Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
X-Ms-Error-Code: [AuthorizationFailure]
X-Ms-Request-Id: [33479d26-001e-000a-7288-affc0a000000]
X-Ms-Version: [2018-03-28]

user@host:/tmp$

I would guess that is because the credentials that you are using doesn’t allow buckets to be created, and for some reason in

rclone copy data/1/2/3/4/5/12345 azureblob:blobcontainerfoo

rclone attempts to create the bucket whereas in

rclone copy data/1/2/3/4/5 azureblob:blobcontainerfoo

It doesn’t. Looking at the traces with -vv --dump bodies this appears to be the case.

I’ve attempted to fix this here - can you have a go?

https://beta.rclone.org/branch/v1.45-101-g4c346ea4-fix-azureblob-mkdir-beta/ (uploaded in 15-30 mins)

Doesn’t look like it fixed it:

user@host:/tmp$ rclone ls azureblob:blobcontainerfoo
user@host:/tmp$ rclone copy data/1/2/3/4/5 azureblob:blobcontainerfoo
user@host:/tmp$ rclone copy -v data/1/2/3/4/5/12345 azureblob:blobcontainerfoo
2019/01/22 18:25:55 INFO  : 
Transferred:             0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 0
Checks:                 1 / 1, 100%
Transferred:            0 / 0, -
Elapsed time:       200ms

user@host:/tmp$ rclone ls azureblob:blobcontainerfoo
1048576000 12345
user@host:/tmp$ rclone delete azureblob:blobcontainerfoo/12345
user@host:/tmp$ rclone copy -v data/1/2/3/4/5/12345 azureblob:blobcontainerfoo
2019/01/22 18:26:18 ERROR : 12345: Failed to copy: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:6c915282-a01e-0026-5d7f-b25f5c000000
Time:2019-01-22T18:26:18.2154943Z, Details: 
   Code: AuthorizationFailure
   GET
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2029-01-19&sig=REDACTED&sp=rwdl&sr=c&sv=2016-05-31&timeout=31536001
   User-Agent: [rclone/v1.45-101-g4c346ea4-fix-azureblob-mkdir-beta]
   X-Ms-Client-Request-Id: [00c64004-2ec9-4e67-4c2f-abc8680b50da]
   X-Ms-Version: [2018-03-28]
   --------------------------------------------------------------------------------
   RESPONSE Status: 403 This request is not authorized to perform this operation.
   Content-Length: [246]
   Content-Type: [application/xml]
   Date: [Tue, 22 Jan 2019 18:26:17 GMT]
   Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
   X-Ms-Error-Code: [AuthorizationFailure]
   X-Ms-Request-Id: [6c915282-a01e-0026-5d7f-b25f5c000000]
   X-Ms-Version: [2018-03-28]


2019/01/22 18:26:18 ERROR : Attempt 1/3 failed with 1 errors and: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:6c915282-a01e-0026-5d7f-b25f5c000000
Time:2019-01-22T18:26:18.2154943Z, Details: 
   Code: AuthorizationFailure
   GET
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2029-01-19&sig=REDACTED&sp=rwdl&sr=c&sv=2016-05-31&timeout=31536001
   User-Agent: [rclone/v1.45-101-g4c346ea4-fix-azureblob-mkdir-beta]
   X-Ms-Client-Request-Id: [00c64004-2ec9-4e67-4c2f-abc8680b50da]
   X-Ms-Version: [2018-03-28]
   --------------------------------------------------------------------------------
   RESPONSE Status: 403 This request is not authorized to perform this operation.
   Content-Length: [246]
   Content-Type: [application/xml]
   Date: [Tue, 22 Jan 2019 18:26:17 GMT]
   Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
   X-Ms-Error-Code: [AuthorizationFailure]
   X-Ms-Request-Id: [6c915282-a01e-0026-5d7f-b25f5c000000]
   X-Ms-Version: [2018-03-28]


2019/01/22 18:26:18 ERROR : 12345: Failed to copy: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:6c915297-a01e-0026-717f-b25f5c000000
Time:2019-01-22T18:26:18.2475200Z, Details: 
   Code: AuthorizationFailure
   GET
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2029-01-19&sig=REDACTED&sp=rwdl&sr=c&sv=2016-05-31&timeout=31536001
   User-Agent: [rclone/v1.45-101-g4c346ea4-fix-azureblob-mkdir-beta]
   X-Ms-Client-Request-Id: [74a4bb46-e772-42eb-68e6-3aef697612bb]
   X-Ms-Version: [2018-03-28]
   --------------------------------------------------------------------------------
   RESPONSE Status: 403 This request is not authorized to perform this operation.
   Content-Length: [246]
   Content-Type: [application/xml]
   Date: [Tue, 22 Jan 2019 18:26:17 GMT]
   Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
   X-Ms-Error-Code: [AuthorizationFailure]
   X-Ms-Request-Id: [6c915297-a01e-0026-717f-b25f5c000000]
   X-Ms-Version: [2018-03-28]


2019/01/22 18:26:18 ERROR : Attempt 2/3 failed with 1 errors and: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:6c915297-a01e-0026-717f-b25f5c000000
Time:2019-01-22T18:26:18.2475200Z, Details: 
   Code: AuthorizationFailure
   GET
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2029-01-19&sig=REDACTED&sp=rwdl&sr=c&sv=2016-05-31&timeout=31536001
   User-Agent: [rclone/v1.45-101-g4c346ea4-fix-azureblob-mkdir-beta]
   X-Ms-Client-Request-Id: [74a4bb46-e772-42eb-68e6-3aef697612bb]
   X-Ms-Version: [2018-03-28]
   --------------------------------------------------------------------------------
   RESPONSE Status: 403 This request is not authorized to perform this operation.
   Content-Length: [246]
   Content-Type: [application/xml]
   Date: [Tue, 22 Jan 2019 18:26:17 GMT]
   Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
   X-Ms-Error-Code: [AuthorizationFailure]
   X-Ms-Request-Id: [6c915297-a01e-0026-717f-b25f5c000000]
   X-Ms-Version: [2018-03-28]


2019/01/22 18:26:18 ERROR : 12345: Failed to copy: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:6c9152b8-a01e-0026-107f-b25f5c000000
Time:2019-01-22T18:26:18.2795461Z, Details: 
   Code: AuthorizationFailure
   GET
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2029-01-19&sig=REDACTED&sp=rwdl&sr=c&sv=2016-05-31&timeout=31536001
   User-Agent: [rclone/v1.45-101-g4c346ea4-fix-azureblob-mkdir-beta]
   X-Ms-Client-Request-Id: [ff8c530b-5537-484e-67f6-a2b04542a4a0]
   X-Ms-Version: [2018-03-28]
   --------------------------------------------------------------------------------
   RESPONSE Status: 403 This request is not authorized to perform this operation.
   Content-Length: [246]
   Content-Type: [application/xml]
   Date: [Tue, 22 Jan 2019 18:26:17 GMT]
   Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
   X-Ms-Error-Code: [AuthorizationFailure]
   X-Ms-Request-Id: [6c9152b8-a01e-0026-107f-b25f5c000000]
   X-Ms-Version: [2018-03-28]


2019/01/22 18:26:18 ERROR : Attempt 3/3 failed with 1 errors and: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:6c9152b8-a01e-0026-107f-b25f5c000000
Time:2019-01-22T18:26:18.2795461Z, Details: 
   Code: AuthorizationFailure
   GET
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2029-01-19&sig=REDACTED&sp=rwdl&sr=c&sv=2016-05-31&timeout=31536001
   User-Agent: [rclone/v1.45-101-g4c346ea4-fix-azureblob-mkdir-beta]
   X-Ms-Client-Request-Id: [ff8c530b-5537-484e-67f6-a2b04542a4a0]
   X-Ms-Version: [2018-03-28]
   --------------------------------------------------------------------------------
   RESPONSE Status: 403 This request is not authorized to perform this operation.
   Content-Length: [246]
   Content-Type: [application/xml]
   Date: [Tue, 22 Jan 2019 18:26:17 GMT]
   Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
   X-Ms-Error-Code: [AuthorizationFailure]
   X-Ms-Request-Id: [6c9152b8-a01e-0026-107f-b25f5c000000]
   X-Ms-Version: [2018-03-28]


2019/01/22 18:26:18 Failed to copy: ->
github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob.NewResponseError,
/home/travis/gopath/src/github.com/ncw/rclone/vendor/github.com/Azure/azure-storage-blob-go/azblob/zz_generated_response_error.go:28
===== RESPONSE ERROR (ServiceCode=AuthorizationFailure) =====
Description=This request is not authorized to perform this operation.
RequestId:6c9152b8-a01e-0026-107f-b25f5c000000
Time:2019-01-22T18:26:18.2795461Z, Details: 
   Code: AuthorizationFailure
   GET
https://storagefoo.blob.core.windows.net/blobcontainerfoo?restype=container&se=2029-01-19&sig=REDACTED&sp=rwdl&sr=c&sv=2016-05-31&timeout=31536001
   User-Agent: [rclone/v1.45-101-g4c346ea4-fix-azureblob-mkdir-beta]
   X-Ms-Client-Request-Id: [ff8c530b-5537-484e-67f6-a2b04542a4a0]
   X-Ms-Version: [2018-03-28]
   --------------------------------------------------------------------------------
   RESPONSE Status: 403 This request is not authorized to perform this operation.
   Content-Length: [246]
   Content-Type: [application/xml]
   Date: [Tue, 22 Jan 2019 18:26:17 GMT]
   Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
   X-Ms-Error-Code: [AuthorizationFailure]
   X-Ms-Request-Id: [6c9152b8-a01e-0026-107f-b25f5c000000]
   X-Ms-Version: [2018-03-28]


user@host:/tmp$ rclone version
rclone v1.45-101-g4c346ea4-fix-azureblob-mkdir-beta
- os/arch: linux/amd64
- go version: go1.11.4
user@host:/tmp$

This is failing on a GET request which is listing the container. So do the credentials you are using have permission to list the container?

I believe so - look at the ‘rclone ls azureblob:blobcontainerfoo’ output.
Also, SAS URL has ‘sp=rwdl’ (read/write/delete/list)

Ah sorry, I mis-identified the API call… It is this one read container metadata and that is the new call I put in.

It says in the docs

Authorization

If the container’s access control list (ACL) is set to allow anonymous access to the container, any client may call this operation. If the container is private, this operation can be performed by the account owner.

So it looks like that isn’t a good call to check for container existence. I changed it to list 1 blob out of the container instead - can you have a go with this?

https://beta.rclone.org/branch/v1.45-101-g2fc095cd-fix-azureblob-mkdir-beta/ (uploaded in 15-30 mins)

Works now! Thanks Nick!!

1 Like

Great!

I’ve merged this to master now which means it will be in the latest beta in 15-30 mins and released in v1.46

Thanks! When are you planning to release 1.46, btw?

Listed here: