[FreeBSD] Dotfiles
Martijn
6 February 2014, 12:08
Just curious.
I've set AllowDotFiles to no.
When I do a truss -p hiawatha_pid and request a page, why does it try to open .hiawatha?
open("/.hiawatha",O_RDONLY,0666) ERR#2 'No such file or directory'
open("/usr/.hiawatha",O_RDONLY,0666) ERR#2 'No such file or directory'
open("/usr/local/.hiawatha",O_RDONLY,0666) ERR#2 'No such file or directory'
open("/usr/local/www/.hiawatha",O_RDONLY,0666) ERR#2 'No such file or directory'
open("/usr/local/www/mysite/.hiawatha",O_RDONLY,0666) ERR#2 'No such file or directory'
open("/usr/local/www/mysite/data/.hiawatha",O_RDONLY,0666) ERR#2 'No such file or directory'
open("/usr/local/www/mysite/data/hello.php",O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,0232662060) ERR#20 'Not a directory'
Hiawatha version: 9.3.1
Operating System: FreeBSD 10
Hugo Leisink
6 February 2014, 13:09
The AllowDotFiles defines whether a client is allowed to request a file starting with a dot or not. Btw, access to a .hiawatha by a client is always denied.
What you have seen is Hiawatha itself scanning for the existing of a .hiawatha file. A .hiawatha file can be used to set configuration options for a specific directory. Hiawatha has of course read that file to see what options are set for that directory.
Martijn
6 February 2014, 14:10
Oke.
But does this affect performance just like the AllowOverride All / .htaccess on Apache?
Because it tries to open several .hiawatha files?
Is it possible to completely disable .hiawatha support so the system does not check for .hiawatha files?
Hugo Leisink
7 February 2014, 08:05
The checking-for-.hiawatha is not noticable, so don't worry about it. Hiawatha has no option to disable the usage of .hiawatha files.
Martijn
7 February 2014, 12:24
Not sure.
Apache states that .htaccess should be disabled on production servers where performance is important.
I have a site that has a lot of thumbs and images.
1 Page has about 20 thumbsnail which are located in a directory like:
/usr/local/www/mysite/data/uploads/thumbs
So that means 7x open call for .hiawatha X 20 images = 140 open calls for only 1 page request (and of course for some other files as well).
Imagine there are 20 concurrent users loading that page. I waste 2800 open calls, none of my sites use .hiawatha files.
Can I place a feature request for a option to disable .hiawatha files (not just AllowDotFiles)?
So like the .htaccess equivalent AllowOverride None.
Or am I wrong about this?
Hugo Leisink
7 February 2014, 13:19
Consider it done. The 'IgnoreDotHiawatha' option will be available in 9.4.
Martijn
7 February 2014, 13:44
Thanks!
This topic has been closed.