Directory permissions behavior changed?

mike mike503 at gmail.com
Fri Aug 8 21:01:26 MSD 2008


On 8/8/08, Maxim Dounin <mdounin at mdounin.ru> wrote:

> Directory listings handled by another module (ngx_http_autoindex_module), it
> has nothing to do here.

But it would fall back to autoindex if
a) no index files were found
b) autoindex was enabled
c) the directory passed stat() test

Correct?

> The cause of problems was directory testing. I believe this is optimization
> to avoid multiple unneeded syscalls when user requested something in
> nonexisting directory.

Yeah, I could see the reasoning (I think) but also it's up to us how
many index files we define. So we can control the performance there -
just like in Apache or other webservers, they tell you not to put too
many files down, the more compact the list is the less performance hit
you'll have. Or to reorder it properly so it passes on the first
check.

This patch does make sense, right? I'm not insane here I hope. I
talked with a couple other people and it seems like it does make
sense. It's a perfectly good idea to do the syscall to check if the
dir exists but I think it only makes sense to do so after the
configured options have been exhausted.





More information about the nginx mailing list