You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Kevin Miles <ke...@delgaldo.co.uk> on 2017/07/11 15:53:48 UTC

[users@httpd] Apache (2.4.26) changing permissions on passwd file?

I wonder if someone can shed some light on this.

I've been running Apache 2.4.7 on Ubuntu 14.04LTS using a VirtualHost 
with a passwd file and all was working fine. I upgraded Apache to 2.4.26 
and the site stopped working. The error being logged is:

[Tue Jul 11 20:58:27.722904 2017] [authn_file:error] [pid 3403] 
(13)Permission denied: [client ::1:37626] AH01620: Could not open 
password file: /etc/stm/passwd

Sure enough, when I check /etc/stm/passwd its permissions have been 
changed from 644 to 600. When I change them back, everything starts 
working. But when I reload the system, something sets them back to 600 
and it stops working!

AFAICT it's Apache that is changing the permissions. Audit shows the 
only process touching this file is Apache (htpasswd). And if I disable 
Apache on start-up and perform a system reload, the permissions are 
unchanged. Until I start Apache, when they get flipped back to 600.

On the face of it, Apache 2.4.26 appears to be changing the permissions 
on my passwd file to a value that prevents it from using it. I can't see 
anything in the Release Notes that indicates this is a feature... Can 
anyone tell me why this is happening, and suggest the best solution for 
getting this VirtualHost working again?

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache (2.4.26) changing permissions on passwd file?

Posted by Jacob Champion <ch...@gmail.com>.
On 07/11/2017 09:12 AM, Alexandru Duzsardi wrote:
> how does the httpd process change the permissions of that file? does 
> that before droping root privileges? if not what would it stop it to 
> change any file permissions?

OP said htpasswd was touching the file, not httpd.

--Jacob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache (2.4.26) changing permissions on passwd file?

Posted by Alexandru Duzsardi <al...@pitechnologies.ro>.
how does the httpd process change the permissions of that file?
does that before droping root privileges?
if not what would it stop it to change any file permissions?


On Tue, 11 Jul 2017 at 19:08, Eric Covener <co...@gmail.com> wrote:

> On Tue, Jul 11, 2017 at 11:53 AM, Kevin Miles <ke...@delgaldo.co.uk>
> wrote:
> > On the face of it, Apache 2.4.26 appears to be changing the permissions
> on
> > my passwd file to a value that prevents it from using it. I can't see
> > anything in the Release Notes that indicates this is a feature... Can
> anyone
> > tell me why this is happening, and suggest the best solution for getting
> > this VirtualHost working again?
>
> See bug 61240, It's fixed in todays 2.4.27 release.
>
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Apache (2.4.26) changing permissions on passwd file?

Posted by Eric Covener <co...@gmail.com>.
On Tue, Jul 11, 2017 at 11:53 AM, Kevin Miles <ke...@delgaldo.co.uk> wrote:
> On the face of it, Apache 2.4.26 appears to be changing the permissions on
> my passwd file to a value that prevents it from using it. I can't see
> anything in the Release Notes that indicates this is a feature... Can anyone
> tell me why this is happening, and suggest the best solution for getting
> this VirtualHost working again?

See bug 61240, It's fixed in todays 2.4.27 release.


-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache (2.4.26) changing permissions on passwd file?

Posted by Alexandru Duzsardi <al...@pitechnologies.ro>.
I doubt it that apache is changing anything in a folder like /etc/stm/
Check your system crontabs or check where the changes might come from.
Alternatively change the location of your file.

-----Original Message-----
From: Kevin Miles [mailto:kevin@delgaldo.co.uk] 
Sent: Tuesday, July 11, 2017 6:54 PM
To: users@httpd.apache.org
Subject: [users@httpd] Apache (2.4.26) changing permissions on passwd file?

I wonder if someone can shed some light on this.

I've been running Apache 2.4.7 on Ubuntu 14.04LTS using a VirtualHost with a passwd file and all was working fine. I upgraded Apache to 2.4.26 and the site stopped working. The error being logged is:

[Tue Jul 11 20:58:27.722904 2017] [authn_file:error] [pid 3403] (13)Permission denied: [client ::1:37626] AH01620: Could not open password file: /etc/stm/passwd

Sure enough, when I check /etc/stm/passwd its permissions have been changed from 644 to 600. When I change them back, everything starts working. But when I reload the system, something sets them back to 600 and it stops working!

AFAICT it's Apache that is changing the permissions. Audit shows the only process touching this file is Apache (htpasswd). And if I disable Apache on start-up and perform a system reload, the permissions are unchanged. Until I start Apache, when they get flipped back to 600.

On the face of it, Apache 2.4.26 appears to be changing the permissions on my passwd file to a value that prevents it from using it. I can't see anything in the Release Notes that indicates this is a feature... Can anyone tell me why this is happening, and suggest the best solution for getting this VirtualHost working again?

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache (2.4.26) changing permissions on passwd file?

Posted by Jacob Champion <ch...@gmail.com>.
On 07/11/2017 08:53 AM, Kevin Miles wrote:
> Sure enough, when I check /etc/stm/passwd its permissions have been 
> changed from 644 to 600. When I change them back, everything starts 
> working. But when I reload the system, something sets them back to 600 
> and it stops working!

This looks like PR61240 [1], which should be fixed in the just-announced 
2.4.27.

--Jacob

[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=61240

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Apache (2.4.26) changing permissions on passwd file?

Posted by Kevin Miles <ke...@delgaldo.co.uk>.
Thanks Jacob and Eric. Switching to 2.4.27 resolved the problem.

Regards.

On 11/07/2017 16:53, Kevin Miles wrote:
> I wonder if someone can shed some light on this.
> 
> I've been running Apache 2.4.7 on Ubuntu 14.04LTS using a VirtualHost 
> with a passwd file and all was working fine. I upgraded Apache to 2.4.26 
> and the site stopped working. The error being logged is:
> 
> [Tue Jul 11 20:58:27.722904 2017] [authn_file:error] [pid 3403] 
> (13)Permission denied: [client ::1:37626] AH01620: Could not open 
> password file: /etc/stm/passwd
> 
> Sure enough, when I check /etc/stm/passwd its permissions have been 
> changed from 644 to 600. When I change them back, everything starts 
> working. But when I reload the system, something sets them back to 600 
> and it stops working!
> 
> AFAICT it's Apache that is changing the permissions. Audit shows the 
> only process touching this file is Apache (htpasswd). And if I disable 
> Apache on start-up and perform a system reload, the permissions are 
> unchanged. Until I start Apache, when they get flipped back to 600.
> 
> On the face of it, Apache 2.4.26 appears to be changing the permissions 
> on my passwd file to a value that prevents it from using it. I can't see 
> anything in the Release Notes that indicates this is a feature... Can 
> anyone tell me why this is happening, and suggest the best solution for 
> getting this VirtualHost working again?
> 
> Thanks.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache (2.4.26) changing permissions on passwd file?

Posted by Yehuda Katz <ye...@ymkatz.net>.
Did you compile Apache yourself or use a package from somewhere?

- Y

Sent from a device with a very small keyboard and hyperactive autocorrect.


On Jul 11, 2017 11:53 AM, "Kevin Miles" <ke...@delgaldo.co.uk> wrote:

I wonder if someone can shed some light on this.

I've been running Apache 2.4.7 on Ubuntu 14.04LTS using a VirtualHost with
a passwd file and all was working fine. I upgraded Apache to 2.4.26 and the
site stopped working. The error being logged is:

[Tue Jul 11 20:58:27.722904 2017] [authn_file:error] [pid 3403]
(13)Permission denied: [client ::1:37626] AH01620: Could not open password
file: /etc/stm/passwd

Sure enough, when I check /etc/stm/passwd its permissions have been changed
from 644 to 600. When I change them back, everything starts working. But
when I reload the system, something sets them back to 600 and it stops
working!

AFAICT it's Apache that is changing the permissions. Audit shows the only
process touching this file is Apache (htpasswd). And if I disable Apache on
start-up and perform a system reload, the permissions are unchanged. Until
I start Apache, when they get flipped back to 600.

On the face of it, Apache 2.4.26 appears to be changing the permissions on
my passwd file to a value that prevents it from using it. I can't see
anything in the Release Notes that indicates this is a feature... Can
anyone tell me why this is happening, and suggest the best solution for
getting this VirtualHost working again?

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org