[mod_python] req.sendfile() problem

Deron Meranda deron.meranda at gmail.com
Fri Aug 4 18:12:39 EDT 2006


On 8/4/06, Thomas J. Schirripa <tommys at eden.rutgers.edu> wrote:
> Thanks a lot guys, the problem is fixed.

Just for the record, as I noticed you're using RHEL 4 (Linux), there is
another thing that can cause the same stat error.

If your Linux is configured with SELinux enabled, then you need to
make sure that the file you're trying to send has an appropriate
security context type set; as apache (and hence mod_python) usually
runs with a very restrictive security context.

With the Red Hat policies, this usually means you'll want to do the
following:

   chcon -t httpd_sys_content_t  /path/to/your/file

If you set that on a directory, then any new files created under it
will inherit that context type.
-- 
Deron Meranda


More information about the Mod_python mailing list