nfs/svn/apache strange interaction

J. Bruce Fields bfields at fieldses.org
Mon Apr 28 14:53:44 EDT 2008


On Mon, Apr 28, 2008 at 02:38:10PM -0400, bfields wrote:
> That just means that apache can handle an ENOENT return from stat of
> .htaccess.  That doesn't mean it's necessarily prepared to handle STALE.

In fact, look at, for example, the apache2 source (in my case from the
debian apache2 package), in server/config.c:ap_parse_htaccess():

	status = ap_pcfg_openfile(&f, r->pool, filename);

	if (status == APR_SUCCESS) {
		...
	}
	else {
           if (!APR_STATUS_IS_ENOENT(status)
                && !APR_STATUS_IS_ENOTDIR(status)) {
                ap_log_rerror(APLOG_MARK, APLOG_CRIT, status, r,
                              "%s pcfg_openfile: unable to check htaccess file, "
                              "ensure it is readable",
                              filename);
                apr_table_setn(r->notes, "error-notes",
                               "Server unable to read htaccess file, denying "
                               "access to be safe");
                return HTTP_FORBIDDEN;
	}

So it's very definitely treating ENOENT and ENOTIDIR, treating anything
else like a permissions error, and probably failing the request.

No idea if that's the version of the code you're using, etc., but it's
quite reasonable to expect your version of apache has similar behavior.

--b.


More information about the NFSv4 mailing list