I’m getting a Forbidden error when trying to access objects in my Object Storage bucket after renaming a folder. How can I access my files?

Linode Staff

I created a folder in my Object Storage bucket called “Example’Apostrophe”. I’m not able to access the files in that folder from the Cloud Manager, so I renamed the folder in Cyberduck to remove the special character. I’m now seeing a Forbidden error on the command line instead, with a “SignatureDoesNotMatch” error in the Cloud Manager. How can I access my files in this folder?

1 Reply

Linode Staff

In certain use cases, Cyberduck can erase the permissions of objects within a folder if it is renamed. This results in a 403 Forbidden error message when trying to access the objects within the folder. You can verify whether your objects are in this state by running the following command on both an accessible and non-accessible object:

s3cmd info bucketName/folderName/file.txt |  egrep 'ACL|MD5'

Replace bucketName with your bucket, folderName with the folder, and file.txt with the object within that folder. On the accessible object, you’ll have output for the ACL. On a non-accessible object, you’ll see a 403 Forbidden error. This demonstrates that the permissions for the non-accessible object are gone. You can fix this by running the following command:

setacl --recursive --acl-grant=full_control:yourACLhere s3://bucketname/renamedFolder

You’ll need to replace “yourACLhere” with your ACL. This value can be obtained by running s3cmd info bucketName/folderName/file.txt | egrep ‘ACL|MD5’; the string of letters and numbers next to the ACL output is what you’ll need to use. You’ll want to run this command on the folder that contains the inaccessible objects. This command will recursively add permissions back to the objects within the folder, and you will then be able to access them successfully. You can either download the files or move them over to a new folder that does not contain a special character.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct