Hello, when I try to download a zip file on my web site it gives me a 403 Forbidden nginx error, I already saw the file permission and it’s with a 644 permission. Does someone knows how to fix it?
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!
This usually means you should give the user that runs the nginx process permissions to read the file.
This user that runs the nginx process is configurable with the user directive in the nginx config, usually located somewhere on the top of nginx.conf:
user www-data
You’ll need to use the change ownership command - chown on your file.
chown www-data:www-data my-file.html
If your whole directory/files are like that you’ll need to do it recursively.
chown -Rv www-data:www-data /path/to/home/directory
Please be careful with the path to your home dir and make sure it’s the correct one.
Regards, KDSys
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.