All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem - reiser4(2004.08.13), apache(2.0.50) and "AllowOverride All"
@ 2004-08-24 16:51 Andreas Sundstrom
  2004-08-24 18:42 ` Hans Reiser
  2004-08-24 18:43 ` Christophe Saout
  0 siblings, 2 replies; 8+ messages in thread
From: Andreas Sundstrom @ 2004-08-24 16:51 UTC (permalink / raw)
  To: reiserfs-list

If I enable "AllowOverride All" in apache it can no longer serve files
from reiser4 filesystems.

Here's an error from apache:

(13)Permission denied: /var/www/htdocs/valid-xhtml11.png/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is 
readable, referer: http://zappa.cx/

Some info about the file:
sunkan@zappa:~$ ls -il /var/www/htdocs/valid-xhtml11.png
72832 -rw-r--r--  1 root root 1917 Sep 14  2001 /var/www/htdocs/valid-xhtml11.png

sunkan@zappa:~$ file /var/www/htdocs/valid-xhtml11.png
/var/www/htdocs/valid-xhtml11.png: PNG image data, 88 x 31, 8-bit colormap, non-interlaced

I found this post to be interesting:
http://marc.theaimsgroup.com/?l=reiserfs&m=109114584717552&w=2

I used this patch to get reiser4 support in my kernel:
http://linux.mjh.name/kernel/patches/reiser4/2004.08.13_2.6.8.1/

So I'm running vanilla 2.6.8.1 except for reiser4.

sunkan@zappa:~/kernel/linux-2.6.8.1-reiser4$ grep REISER .config
CONFIG_REISER4_FS=y
CONFIG_REISER4_LARGE_KEY=y
# CONFIG_REISER4_CHECK is not set
CONFIG_REISERFS_FS=y
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
CONFIG_REISERFS_FS_XATTR=y
CONFIG_REISERFS_FS_POSIX_ACL=y
# CONFIG_REISERFS_FS_SECURITY is not set

sunkan@zappa:~/kernel/linux-2.6.8.1-reiser4$ grep 4KSTACK .config
# CONFIG_4KSTACKS is not set

My guess is that apache tries to open every file as an directory and
if that works it checks wether an .htaccess file is present but that
fails in my case beacause it isn't an directory but a file.

Who's to blame? ;)

Let me know if I need to gather more information about this.

I'm currently not on the list so please CC me if you want fast
responses. (otherwise I read the archives)

Thanks for any help..
/Andreas Sundstrom

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem - reiser4(2004.08.13), apache(2.0.50) and "AllowOverride All"
  2004-08-24 16:51 Problem - reiser4(2004.08.13), apache(2.0.50) and "AllowOverride All" Andreas Sundstrom
@ 2004-08-24 18:42 ` Hans Reiser
  2004-08-24 19:00   ` Andreas Sundstrom
  2004-08-24 18:43 ` Christophe Saout
  1 sibling, 1 reply; 8+ messages in thread
From: Hans Reiser @ 2004-08-24 18:42 UTC (permalink / raw)
  To: Andreas Sundstrom, Alexander Lyamin aka FLX; +Cc: reiserfs-list

Thanks, I think you just diagnosed one of our support requests. flx, can 
you write and send in a patch to the apache maintainers?  (Zam has a 
huge backlog of tasks....)  Zam, can you send the support requestor this 
diagnosis?

So, we now have 0 bug reports resulting from going into -mm. 

Could be that we ask to go into it next week.....:)

Hans

Andreas Sundstrom wrote:

> If I enable "AllowOverride All" in apache it can no longer serve files
> from reiser4 filesystems.
>
> Here's an error from apache:
>
> (13)Permission denied: /var/www/htdocs/valid-xhtml11.png/.htaccess 
> pcfg_openfile: unable to check htaccess file, ensure it is readable, 
> referer: http://zappa.cx/
>
> Some info about the file:
> sunkan@zappa:~$ ls -il /var/www/htdocs/valid-xhtml11.png
> 72832 -rw-r--r--  1 root root 1917 Sep 14  2001 
> /var/www/htdocs/valid-xhtml11.png
>
> sunkan@zappa:~$ file /var/www/htdocs/valid-xhtml11.png
> /var/www/htdocs/valid-xhtml11.png: PNG image data, 88 x 31, 8-bit 
> colormap, non-interlaced
>
> I found this post to be interesting:
> http://marc.theaimsgroup.com/?l=reiserfs&m=109114584717552&w=2
>
> I used this patch to get reiser4 support in my kernel:
> http://linux.mjh.name/kernel/patches/reiser4/2004.08.13_2.6.8.1/
>
> So I'm running vanilla 2.6.8.1 except for reiser4.
>
> sunkan@zappa:~/kernel/linux-2.6.8.1-reiser4$ grep REISER .config
> CONFIG_REISER4_FS=y
> CONFIG_REISER4_LARGE_KEY=y
> # CONFIG_REISER4_CHECK is not set
> CONFIG_REISERFS_FS=y
> # CONFIG_REISERFS_CHECK is not set
> # CONFIG_REISERFS_PROC_INFO is not set
> CONFIG_REISERFS_FS_XATTR=y
> CONFIG_REISERFS_FS_POSIX_ACL=y
> # CONFIG_REISERFS_FS_SECURITY is not set
>
> sunkan@zappa:~/kernel/linux-2.6.8.1-reiser4$ grep 4KSTACK .config
> # CONFIG_4KSTACKS is not set
>
> My guess is that apache tries to open every file as an directory and
> if that works it checks wether an .htaccess file is present but that
> fails in my case beacause it isn't an directory but a file.
>
> Who's to blame? ;)
>
> Let me know if I need to gather more information about this.
>
> I'm currently not on the list so please CC me if you want fast
> responses. (otherwise I read the archives)
>
> Thanks for any help..
> /Andreas Sundstrom
>
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem - reiser4(2004.08.13), apache(2.0.50) and "AllowOverride All"
  2004-08-24 16:51 Problem - reiser4(2004.08.13), apache(2.0.50) and "AllowOverride All" Andreas Sundstrom
  2004-08-24 18:42 ` Hans Reiser
@ 2004-08-24 18:43 ` Christophe Saout
  2004-08-24 19:20   ` Christophe Saout
  2004-08-25  7:42   ` Alex Zarochentsev
  1 sibling, 2 replies; 8+ messages in thread
From: Christophe Saout @ 2004-08-24 18:43 UTC (permalink / raw)
  To: Andreas Sundstrom; +Cc: reiserfs-list

[-- Attachment #1: Type: text/plain, Size: 666 bytes --]

Am Dienstag, den 24.08.2004, 18:51 +0200 schrieb Andreas Sundstrom:

> If I enable "AllowOverride All" in apache it can no longer serve files
> from reiser4 filesystems.
> 
> Here's an error from apache:
> 
> (13)Permission denied: /var/www/htdocs/valid-xhtml11.png/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is 
> readable, referer: http://zappa.cx/

Well, this as a ENOTDIR vs. EPERM problem.

Apache2 expects the filesystem to return ENOTDIR when it tries to access
some_file/.htaccess. reiser4 returns EPERM and apache2 thinks that
some_file is actually a directory but doesn't have permissions to access
that directory.


[-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem - reiser4(2004.08.13), apache(2.0.50) and "AllowOverride All"
  2004-08-24 18:42 ` Hans Reiser
@ 2004-08-24 19:00   ` Andreas Sundstrom
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Sundstrom @ 2004-08-24 19:00 UTC (permalink / raw)
  To: reiserfs-list

Hans Reiser wrote:
> Thanks, I think you just diagnosed one of our support requests. flx, can 

Great, it's always nice to be able to help out in some way ;)

> you write and send in a patch to the apache maintainers?  (Zam has a 

If a patch is created I would very much like to get hold of it so I can
revert to my normal setup on apache.

> huge backlog of tasks....)  Zam, can you send the support requestor this 
> diagnosis?
> 
> So, we now have 0 bug reports resulting from going into -mm.
> Could be that we ask to go into it next week.....:)
> 
> Hans
> 
> Andreas Sundstrom wrote:
> 
>> If I enable "AllowOverride All" in apache it can no longer serve files
>> from reiser4 filesystems.
>>
>> Here's an error from apache:
>>
>> (13)Permission denied: /var/www/htdocs/valid-xhtml11.png/.htaccess 
>> pcfg_openfile: unable to check htaccess file, ensure it is readable, 
>> referer: http://zappa.cx/
>>
>> Some info about the file:
>> sunkan@zappa:~$ ls -il /var/www/htdocs/valid-xhtml11.png
>> 72832 -rw-r--r--  1 root root 1917 Sep 14  2001 
>> /var/www/htdocs/valid-xhtml11.png
>>
>> sunkan@zappa:~$ file /var/www/htdocs/valid-xhtml11.png
>> /var/www/htdocs/valid-xhtml11.png: PNG image data, 88 x 31, 8-bit 
>> colormap, non-interlaced
>>
>> I found this post to be interesting:
>> http://marc.theaimsgroup.com/?l=reiserfs&m=109114584717552&w=2
>>
>> I used this patch to get reiser4 support in my kernel:
>> http://linux.mjh.name/kernel/patches/reiser4/2004.08.13_2.6.8.1/
>>
>> So I'm running vanilla 2.6.8.1 except for reiser4.
>>
>> sunkan@zappa:~/kernel/linux-2.6.8.1-reiser4$ grep REISER .config
>> CONFIG_REISER4_FS=y
>> CONFIG_REISER4_LARGE_KEY=y
>> # CONFIG_REISER4_CHECK is not set
>> CONFIG_REISERFS_FS=y
>> # CONFIG_REISERFS_CHECK is not set
>> # CONFIG_REISERFS_PROC_INFO is not set
>> CONFIG_REISERFS_FS_XATTR=y
>> CONFIG_REISERFS_FS_POSIX_ACL=y
>> # CONFIG_REISERFS_FS_SECURITY is not set
>>
>> sunkan@zappa:~/kernel/linux-2.6.8.1-reiser4$ grep 4KSTACK .config
>> # CONFIG_4KSTACKS is not set
>>
>> My guess is that apache tries to open every file as an directory and
>> if that works it checks wether an .htaccess file is present but that
>> fails in my case beacause it isn't an directory but a file.
>>
>> Who's to blame? ;)
>>
>> Let me know if I need to gather more information about this.
>>
>> I'm currently not on the list so please CC me if you want fast
>> responses. (otherwise I read the archives)
>>
>> Thanks for any help..
>> /Andreas Sundstrom
>>
>>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem - reiser4(2004.08.13), apache(2.0.50) and "AllowOverride All"
  2004-08-24 18:43 ` Christophe Saout
@ 2004-08-24 19:20   ` Christophe Saout
  2004-08-25 21:27     ` Valdis.Kletnieks
  2004-08-25  7:42   ` Alex Zarochentsev
  1 sibling, 1 reply; 8+ messages in thread
From: Christophe Saout @ 2004-08-24 19:20 UTC (permalink / raw)
  To: Andreas Sundstrom; +Cc: reiserfs-list

[-- Attachment #1: Type: text/plain, Size: 546 bytes --]

Am Dienstag, den 24.08.2004, 20:43 +0200 schrieb Christophe Saout:

> Well, this as a ENOTDIR vs. EPERM problem.

Sorry, this was already known. My current apache 2.0.50 seems to call
lstat first though. Perhaps this is already solved? Because I noticed
apache2 doing this while stracing processes for fun on a machine not
running Reiser4 some time ago.

But to make sure nothing goes wrong Apache should not use ENOTDIR at all
or at least have some workaround that calls stat on a file if it returns
EPERM to make sure... (ugly?).


[-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem - reiser4(2004.08.13), apache(2.0.50) and "AllowOverride All"
  2004-08-24 18:43 ` Christophe Saout
  2004-08-24 19:20   ` Christophe Saout
@ 2004-08-25  7:42   ` Alex Zarochentsev
  2004-08-25 15:54     ` Nikita Danilov
  1 sibling, 1 reply; 8+ messages in thread
From: Alex Zarochentsev @ 2004-08-25  7:42 UTC (permalink / raw)
  To: Christophe Saout; +Cc: Andreas Sundstrom, reiserfs-list

On Tue, Aug 24, 2004 at 08:43:35PM +0200, Christophe Saout wrote:
> Am Dienstag, den 24.08.2004, 18:51 +0200 schrieb Andreas Sundstrom:
> 
> > If I enable "AllowOverride All" in apache it can no longer serve files
> > from reiser4 filesystems.
> > 
> > Here's an error from apache:
> > 
> > (13)Permission denied: /var/www/htdocs/valid-xhtml11.png/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is 
> > readable, referer: http://zappa.cx/
> 
> Well, this as a ENOTDIR vs. EPERM problem.
> 
> Apache2 expects the filesystem to return ENOTDIR when it tries to access
> some_file/.htaccess. reiser4 returns EPERM and apache2 thinks that
> some_file is actually a directory but doesn't have permissions to access
> that directory.

yes. exactly.  It is strange that reiser4 passes -ENOTDIR to upper levels
in that case. 

-- 
Alex.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem - reiser4(2004.08.13), apache(2.0.50) and "AllowOverride All"
  2004-08-25  7:42   ` Alex Zarochentsev
@ 2004-08-25 15:54     ` Nikita Danilov
  0 siblings, 0 replies; 8+ messages in thread
From: Nikita Danilov @ 2004-08-25 15:54 UTC (permalink / raw)
  To: Alex Zarochentsev; +Cc: Christophe Saout, Andreas Sundstrom, reiserfs-list

Alex Zarochentsev writes:
 > On Tue, Aug 24, 2004 at 08:43:35PM +0200, Christophe Saout wrote:
 > > Am Dienstag, den 24.08.2004, 18:51 +0200 schrieb Andreas Sundstrom:
 > > 
 > > > If I enable "AllowOverride All" in apache it can no longer serve files
 > > > from reiser4 filesystems.
 > > > 
 > > > Here's an error from apache:
 > > > 
 > > > (13)Permission denied: /var/www/htdocs/valid-xhtml11.png/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is 
 > > > readable, referer: http://zappa.cx/
 > > 
 > > Well, this as a ENOTDIR vs. EPERM problem.
 > > 
 > > Apache2 expects the filesystem to return ENOTDIR when it tries to access
 > > some_file/.htaccess. reiser4 returns EPERM and apache2 thinks that
 > > some_file is actually a directory but doesn't have permissions to access
 > > that directory.
 > 
 > yes. exactly.  It is strange that reiser4 passes -ENOTDIR to upper levels
 > in that case. 

Actual problem is that open(path, O_DIRECTORY) always succeeds in
reiser4, see fs/namei.c:

		if (lookup_flags & LOOKUP_DIRECTORY) {
			err = -ENOTDIR; 
			if (!inode->i_op || !inode->i_op->lookup)
				break;
		}

so all applications using this flag to check whether file is directory
or not are bound to fail.

In this case, apache calls

    open("/var/www/htdocs/valid-xhtml11.png", O_DIRECTORY)

it returns without error, so apache thinks that valid-xhtml11.png is a
directory and proceeds with accessing .htaccess file in it.

 > 
 > -- 
 > Alex.

Nikita.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem - reiser4(2004.08.13), apache(2.0.50) and "AllowOverride All"
  2004-08-24 19:20   ` Christophe Saout
@ 2004-08-25 21:27     ` Valdis.Kletnieks
  0 siblings, 0 replies; 8+ messages in thread
From: Valdis.Kletnieks @ 2004-08-25 21:27 UTC (permalink / raw)
  To: Christophe Saout; +Cc: Andreas Sundstrom, reiserfs-list

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

On Tue, 24 Aug 2004 21:20:28 +0200, Christophe Saout said:

> Sorry, this was already known. My current apache 2.0.50 seems to call
> lstat first though.

Note that doing an lstat first still has a race condition.....

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-08-25 21:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-24 16:51 Problem - reiser4(2004.08.13), apache(2.0.50) and "AllowOverride All" Andreas Sundstrom
2004-08-24 18:42 ` Hans Reiser
2004-08-24 19:00   ` Andreas Sundstrom
2004-08-24 18:43 ` Christophe Saout
2004-08-24 19:20   ` Christophe Saout
2004-08-25 21:27     ` Valdis.Kletnieks
2004-08-25  7:42   ` Alex Zarochentsev
2004-08-25 15:54     ` Nikita Danilov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.