Welcome! Log In Create A New Profile

Advanced

nginx perl $r->sendfile always fails with permissions error?

Posted by _ck_ 
nginx perl $r->sendfile always fails with permissions error?
August 31, 2013 12:55PM
I am trying to get $r->sendfile() working under the perl module for nginx, it always fails.

Basically I have image::magick making a file and then I simply try to send that file with $r->sendfile

The file is definitely created, and can even be sent later, unmodifed, by try_files

I've tinkered with the ownership (chown) and chmod and even nobody:nobody with nginx running as nobody fails.

The only way I can get the file to transmit from perl is to use $r->print while reading the file into a buffer

Depending on the file settings I either get a file not found error (22) but it's definitely there, so it's permissions, or "Inappropriate ioctl for device".

Note that selinux is off (permissive mode).

And remember, it works with try_files, so nginx can read it, just not with perl.

What on earth is sendfile doing, and how it is trying to access the file that every other way works?

I cannot think of anything else to try, thanks for any suggestions.

Oh this is under CentOS 6.4 with nginx 1.4.2



Edited 1 time(s). Last edit at 08/31/2013 12:58PM by _ck_.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 311
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready