On Mon, Sep 13, 2004 at 03:06:37PM +0100, Joe Orton wrote: > Hi, we had a bug report that Apache httpd logs a spurious error for > every file served from a reiser4 filesystem, because httpd assumes that > /path/to/file/.htaccess (where /path/to/file is a normal file) returns > ENOENT or ENOTDIR, but reiser4 returns EACCES in this case. > > Can someone explain the justification behind reiser4's behaviour? > httpd's assumption does not seem unreasonable, and EACCES seems to make > little sense for this error case.
It is because open(name, O_DIRECTORY) is successful for regular files in reiser4. Once it succedes, Apache2 thinks that is a directory and tries to open .htaccess under it. It does not matter what error code is receives there, the problem is that apache2 has decided that the file is a directory. There are two solutions: 1) mount reiser4 partition with "nopseudo" mount option. it makes /metas/* files unaccessible. 2) apply the patch: ===== fs/namei.c 1.104 vs edited ===== --- 1.104/fs/namei.c Tue Aug 10 16:59:38 2004 +++ edited/fs/namei.c Sun Sep 12 11:00:18 2004 @@ -816,7 +816,7 @@ break; if (lookup_flags & LOOKUP_DIRECTORY) { err = -ENOTDIR; - if (!inode->i_op || !inode->i_op->lookup) + if (!S_ISDIR(inode->i_mode)) break; } goto return_base; =============================== > Regards, > > joe -- Alex.