Re: [Mageia-dev] /run/httpd (maybe others) breaking features

2013-01-27 Thread Guillaume Rousse

Le 24/01/2013 08:50, Sander Lepik a écrit :

Fedora uses d /run/httpd 710 root apache which doesn't help in
this case but fixes other problems

Why can't we use d /run/httpd 710 apache apache.
It's quite possible that apache is trying to create this file as apache
not as root. And with current permissions only root can write into that
directory.
Switching from root to apache user may be eventually needed, but I don't 
see the point of using any other perm scheme as 755.


--
BOFH excuse #186:

permission denied


Re: [Mageia-dev] /run/httpd (maybe others) breaking features

2013-01-24 Thread Colin Guthrie
'Twas brillig, and Pascal Terjan at 24/01/13 01:40 did gyre and gimble:
 On Thu, Jan 24, 2013 at 12:45 AM, Colin Guthrie mag...@colin.guthr.ie wrote:
 'Twas brillig, and Pascal Terjan at 24/01/13 00:24 did gyre and gimble:
 I was looking at perl-Apache2-DebugFilter build failure

 In the test it starts an apache which fails as it uses
 http://httpd.apache.org/docs/trunk/rewrite/rewritemap.html#prg which
 uses a mutex stored in /run/httpd/

 [Wed Jan 23 23:49:55.962405 2013] [core:emerg] [pid 55277]
 (13)Permission denied: AH00023: Couldn't create the rewrite-map mutex
 (file /run/httpd/rewrite-map.55277)

 That directory is now owned by root so it can't be used for anything
 except creating the httpd.pid

 $ cat /usr/lib/tmpfiles.d/httpd.conf
 d /run/httpd   755 root root

 Fedora uses d /run/httpd   710 root apache which doesn't help in
 this case but fixes other problems

 In the past (Mageia 1) runtimedir was /var/run directly so it was
 possible to create mutex files there for any user

 Hmm, not sure what you mean here.

 [colin@mga2 ~]$ ls -ld /var/run
 drwxr-xr-x 38 root root 4096 Jan 23 04:04 /var/run/

 That dir is also owned by root with 755 perm. It shouldn't make any odds
 to permissions.
 
 Hmm you are right, I don't know why it got broken then
 
 It used to use /var/run/ as runtime dir and it succeeded creating the mutex
 It now fails to create it in /run/httpd/
 
 I don't have more clues :(
 
 It may be some change in apache but I couldn't find, I'll try to find
 out more tomorrow

If this is on the build system, perhaps the tmpfiles stuff isn't run for
some reason and /run/httpd isnt't created. And then maybe code in apache
tries to mkdir /run/httpd and that's where the permission denied error
comes from?

/me is clutching at straws here :)

Col


-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


Re: [Mageia-dev] /run/httpd (maybe others) breaking features

2013-01-24 Thread Pascal Terjan
On Thu, Jan 24, 2013 at 9:24 AM, Colin Guthrie mag...@colin.guthr.ie wrote:
 'Twas brillig, and Pascal Terjan at 24/01/13 01:40 did gyre and gimble:
 On Thu, Jan 24, 2013 at 12:45 AM, Colin Guthrie mag...@colin.guthr.ie 
 wrote:
 'Twas brillig, and Pascal Terjan at 24/01/13 00:24 did gyre and gimble:
 I was looking at perl-Apache2-DebugFilter build failure

 In the test it starts an apache which fails as it uses
 http://httpd.apache.org/docs/trunk/rewrite/rewritemap.html#prg which
 uses a mutex stored in /run/httpd/

 [Wed Jan 23 23:49:55.962405 2013] [core:emerg] [pid 55277]
 (13)Permission denied: AH00023: Couldn't create the rewrite-map mutex
 (file /run/httpd/rewrite-map.55277)

 That directory is now owned by root so it can't be used for anything
 except creating the httpd.pid

 $ cat /usr/lib/tmpfiles.d/httpd.conf
 d /run/httpd   755 root root

 Fedora uses d /run/httpd   710 root apache which doesn't help in
 this case but fixes other problems

 In the past (Mageia 1) runtimedir was /var/run directly so it was
 possible to create mutex files there for any user

 Hmm, not sure what you mean here.

 [colin@mga2 ~]$ ls -ld /var/run
 drwxr-xr-x 38 root root 4096 Jan 23 04:04 /var/run/

 That dir is also owned by root with 755 perm. It shouldn't make any odds
 to permissions.

 Hmm you are right, I don't know why it got broken then

 It used to use /var/run/ as runtime dir and it succeeded creating the mutex
 It now fails to create it in /run/httpd/

 I don't have more clues :(

 It may be some change in apache but I couldn't find, I'll try to find
 out more tomorrow

 If this is on the build system, perhaps the tmpfiles stuff isn't run for
 some reason and /run/httpd isnt't created. And then maybe code in apache
 tries to mkdir /run/httpd and that's where the permission denied error
 comes from?

 /me is clutching at straws here :)

It seems things are more complicated :)
It used to use ServerRoot + /logs/ (/etc/httpd/logs) which is a
symlink to /var/log/httpd, but seem to now always use /run/httpd, even
when ServerRoot is different.
That's why the tests used to work: they were using a local t/ as
ServerRoot and using t/logs/.

But I am now wondering if the feature in normal usage has ever worked
given that /var/log/httpd permissions are not more open


[Mageia-dev] /run/httpd (maybe others) breaking features

2013-01-23 Thread Pascal Terjan
I was looking at perl-Apache2-DebugFilter build failure

In the test it starts an apache which fails as it uses
http://httpd.apache.org/docs/trunk/rewrite/rewritemap.html#prg which
uses a mutex stored in /run/httpd/

[Wed Jan 23 23:49:55.962405 2013] [core:emerg] [pid 55277]
(13)Permission denied: AH00023: Couldn't create the rewrite-map mutex
(file /run/httpd/rewrite-map.55277)

That directory is now owned by root so it can't be used for anything
except creating the httpd.pid

$ cat /usr/lib/tmpfiles.d/httpd.conf
d /run/httpd   755 root root

Fedora uses d /run/httpd   710 root apache which doesn't help in
this case but fixes other problems

In the past (Mageia 1) runtimedir was /var/run directly so it was
possible to create mutex files there for any user

Is there a list of packages which have moved to subdirectories of /run
and may now be broken too?


Re: [Mageia-dev] /run/httpd (maybe others) breaking features

2013-01-23 Thread Colin Guthrie
'Twas brillig, and Pascal Terjan at 24/01/13 00:24 did gyre and gimble:
 I was looking at perl-Apache2-DebugFilter build failure
 
 In the test it starts an apache which fails as it uses
 http://httpd.apache.org/docs/trunk/rewrite/rewritemap.html#prg which
 uses a mutex stored in /run/httpd/
 
 [Wed Jan 23 23:49:55.962405 2013] [core:emerg] [pid 55277]
 (13)Permission denied: AH00023: Couldn't create the rewrite-map mutex
 (file /run/httpd/rewrite-map.55277)
 
 That directory is now owned by root so it can't be used for anything
 except creating the httpd.pid
 
 $ cat /usr/lib/tmpfiles.d/httpd.conf
 d /run/httpd   755 root root
 
 Fedora uses d /run/httpd   710 root apache which doesn't help in
 this case but fixes other problems
 
 In the past (Mageia 1) runtimedir was /var/run directly so it was
 possible to create mutex files there for any user

Hmm, not sure what you mean here.

[colin@mga2 ~]$ ls -ld /var/run
drwxr-xr-x 38 root root 4096 Jan 23 04:04 /var/run/

That dir is also owned by root with 755 perm. It shouldn't make any odds
to permissions.

 Is there a list of packages which have moved to subdirectories of /run
 and may now be broken too?

Again I don't think so. The fact that /var/run is just a symlink now
should be irrelevant.

Also the fact that /run is mounted on tmpfs vs real fs again should not
alter permissions in any way - all it really means is that

a) it'll be cleared at boot
b) we have to create files/folders with appropriate ownership/perms
during early boot via tmpfiles.

So I'm not really sure what you're saying here, but I don't think it is
any more broken now than it would have been before using /var/run directly.

Col

-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


Re: [Mageia-dev] /run/httpd (maybe others) breaking features

2013-01-23 Thread Pascal Terjan
On Thu, Jan 24, 2013 at 12:45 AM, Colin Guthrie mag...@colin.guthr.ie wrote:
 'Twas brillig, and Pascal Terjan at 24/01/13 00:24 did gyre and gimble:
 I was looking at perl-Apache2-DebugFilter build failure

 In the test it starts an apache which fails as it uses
 http://httpd.apache.org/docs/trunk/rewrite/rewritemap.html#prg which
 uses a mutex stored in /run/httpd/

 [Wed Jan 23 23:49:55.962405 2013] [core:emerg] [pid 55277]
 (13)Permission denied: AH00023: Couldn't create the rewrite-map mutex
 (file /run/httpd/rewrite-map.55277)

 That directory is now owned by root so it can't be used for anything
 except creating the httpd.pid

 $ cat /usr/lib/tmpfiles.d/httpd.conf
 d /run/httpd   755 root root

 Fedora uses d /run/httpd   710 root apache which doesn't help in
 this case but fixes other problems

 In the past (Mageia 1) runtimedir was /var/run directly so it was
 possible to create mutex files there for any user

 Hmm, not sure what you mean here.

 [colin@mga2 ~]$ ls -ld /var/run
 drwxr-xr-x 38 root root 4096 Jan 23 04:04 /var/run/

 That dir is also owned by root with 755 perm. It shouldn't make any odds
 to permissions.

Hmm you are right, I don't know why it got broken then

It used to use /var/run/ as runtime dir and it succeeded creating the mutex
It now fails to create it in /run/httpd/

I don't have more clues :(

It may be some change in apache but I couldn't find, I'll try to find
out more tomorrow


Re: [Mageia-dev] /run/httpd (maybe others) breaking features

2013-01-23 Thread Sander Lepik

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

24.01.2013 02:24, Pascal Terjan kirjutas:
 I was looking at perl-Apache2-DebugFilter build failure

 In the test it starts an apache which fails as it uses
 http://httpd.apache.org/docs/trunk/rewrite/rewritemap.html#prg which
 uses a mutex stored in /run/httpd/

 [Wed Jan 23 23:49:55.962405 2013] [core:emerg] [pid 55277]
 (13)Permission denied: AH00023: Couldn't create the rewrite-map mutex
 (file /run/httpd/rewrite-map.55277)

 That directory is now owned by root so it can't be used for anything
 except creating the httpd.pid

 $ cat /usr/lib/tmpfiles.d/httpd.conf
 d /run/httpd 755 root root

 Fedora uses d /run/httpd 710 root apache which doesn't help in
 this case but fixes other problems
Why can't we use d /run/httpd 710 apache apache.
It's quite possible that apache is trying to create this file as apache
not as root. And with current permissions only root can write into that
directory.

- --
Sander

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRAOe7AAoJECMkkFJIyHr8EtYH/2/H0musOzg8hKinO0OcEj55
fkHKHFr2+m2ge9lD35TkXcXPBTAlNPILPm2d+/S6mrsmCHtEei++LJYtJXyR8m9s
MZyP/r98NdDf4r2EQW+sBLm7IN1csR+pial7tGNnsjvvVZo6gQcbHNeEjZPxTjXC
2N0FGeVYljxMfjvYRbeyq7RejLmZPsEG47fqr4EhdBwp6HykyaDyk4v+0VrzJNYD
fUthrGk6hBVZqgMG7GmiWzOehplKkzD3M7vGz3LNXwmpIEW+v06tXiVgHdIcQkma
4EjMast6bze+NVLhtfs4yyslkjhf5J8EnPZ//cbRiVH81sXfJOtNkWD2+N3Xzbo=
=H0kN
-END PGP SIGNATURE-