Report this

What is the reason for this report?

403 Forbidden on Zip Files Download

Posted on April 29, 2020

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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @bevanessasuryamkt,

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.