I am using Nginx with Django. All configuration are made according to docs provided by DO and everything works fines except I am getting following Error for some of my static files served through DO spaces. When I’m making those files ‘Public’ the error goes away from DO spaces dashboard. I am confused that some files having permission ‘private’ are loading and some have to made ‘public’. Example files in tinymce folder have to be made ‘public’ or files which are in vendor folder.
Error in my Console: GET https://sgp1.digitaloceanspacenet: spaces/static/tinymce/js/tinymce/plugins/textcolor/plugin.min.js :ERR_ABORTED 403 (Forbidden)
Is there any way to give permission to those files without making them ‘public’? or if not any way to make them ‘public’ all at once?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.
When using DigitalOcean Spaces, the access rights of individual objects are determined by the permissions you set. When a file is marked as ‘Private’, direct access is denied, hence the 403 (Forbidden) error you’re encountering. If you want to avoid making these files ‘Public’, one alternative would be to use the Spaces CDN, which creates a unique URL to serve your file while keeping it ‘Private’. Configuring your application to use the CDN link can bypass the need to adjust individual file permissions.
To change your static files to ‘Public’ all at once, you would need to use an S3-compatible tool or script to adjust the permissions in bulk.
For more detailed information on object permissions in Spaces and using the Spaces API to programmatically manage these permissions, please refer to these DigitalOcean Docs.
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.