You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
FAQ
How should I proceed if I encounter an "InvalidPathAccess" error when trying to access TOS via a path-style URL?
Copy page
Download PDF
How should I proceed if I encounter an "InvalidPathAccess" error when trying to access TOS via a path-style URL?
Description​
I received Forbidden path to access server or InvalidPathAccess errors when trying to access TOS via a path-style URL.​
What it means​
TOS only supports virtual-hosted-style requests and does not support path-style requests.​
How to fix it​
The difference between the path style and the virtual-hosted style lies in the location of the bucket name in the HTTP URL. See the example below:​
​
# Path-style URL ​
https://tos-s3-cn-beijing.volces.com/{bucketname} ​
​
# Virtual-hosted-style URL ​
https://{bucketname}.tos-s3-cn-beijing.volces.com​
​
When accessing TOS through S3-compatible SDKs or tools, make sure that the request method is set to "VirtualHostStyle". For example:​
  • When using the AWS S3 Java SDK, disable path-style access during client initialization by setting AmazonS3Builder.withPathStyleAccessEnabled(false).​
  • When using the AWS CLI to access TOS, add addressing_style = virtual to the ~/.aws/config file to use the virtual-hosted style.​
​
Last updated: 2026.06.22 15:21:16