Nginx file upload error

When uploading a file on a PHP Application running under an Nginx web server, I get the following error

2021/08/14 12:32:04 [crit] 1722576#1722576: *42823 open() "/var/lib/nginx/tmp/client_body/0000000006" failed (13: Permission denied), client: 59.12.21.51, server: team.serverok.in, request: "POST /index.php/ijci/$$$call$$$/wizard/file-upload/file-upload-wizard/upload-file?submissionId=311&stageId=1&fileStage=2&reviewRoundId=&assocType=&assocId= HTTP/2.0", host: "team.serverok.in", referrer: "https://team.serverok.in/index.php/ijci/submission/wizard/2?submissionId=311"

The error was due to wrong ownership for folder /var/lib/nginx/tmp/client_body/ or one of its parent folders.

On this web server, nginx was running as user nobody, so to fix the error, I run the following command

chown -R nobody:nobody /var/lib/nginx/

See Nginx

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *