Troubleshooting 4xx

If you request content from SFTP or S3 storage and receive an error in return, check if there are open incidents or maintenances connected with Storage on Status Page.

HTTP 404 

  1. Make sure that a file was upload in storage. You may use any applications that support S3 or SFTP for that purpose. 
  2. Make sure that you use the correct URL form for the request. The scheme for direct storage requests is described in the article. Notice, that the Global 2 location includes three regions: use the host of the region, where the file was uploaded. The region’s URL is described in the article. 

HTTP 403 

By default, buckets and files in S3 storage are private and respond with 403 code on external requests. You can set up ACL rules for bucket or file with your S3-application documentation.

Examples: 

  • To add a rule for public reading via AWS CLI:
aws s3api put-object-acl --bucket my_bucket --key file.jpg --acl public-read --endpoint-url=https://s3.us-east.gcore.com 

Where:

My_bucket – the name of the bucket.

File.jpg - the name of the file.

s3.us-east.gcore.com - the region URL.

 

  • To add a rule for public reading via s3cmd: 
s3cmd setacl --acl-public s3://my_bucket/file.jpg 

Where:

my_bucket – the name of the bucket.

file.jpg - the name of the file.

Was this article helpful?
Recently viewed articles