Bug 50155 - httpd -s attempts to read SSL certificates
Summary: httpd -s attempts to read SSL certificates
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_ssl (show other bugs)
Version: 2.0.52
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Keywords: MassUpdate
: 52867 (view as bug list)
Depends on:
Reported: 2010-10-25 22:19 UTC by Clarence Risher
Modified: 2018-11-07 21:08 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Clarence Risher 2010-10-25 22:19:42 UTC
I am attempting to get the status of a running httpd and a list of its vhosts. Both of these commands
httpd -s
httpd -t -D DUMP_VHOSTS
insist on reading in the SSL certificates for defined https vhosts, which fails for non-root users who can't read those files but are otherwise able to interact with httpd.
Comment 1 Joe Orton 2011-02-12 09:40:41 UTC
This is expected; "httpd -t" is intended to check the validity of the config file and testing for existence of the cert/key files is one of the validity tests.
Comment 2 Clarence Risher 2011-02-12 14:05:50 UTC
Testing for the existence of the cert/key files is not the issue here. Attempting to open them is. If THAT is intended behavior then please re-WONTFIX this.
Comment 3 Joe Orton 2011-02-25 12:00:23 UTC
I can't see mod_ssl opening certs in -t mode here.  The code doesn't show that either; it shows a stat() of the cert file, not an open().

# strace httpd -t -D DUMP_VHOSTS 2>&1 | grep /etc/pki
stat("/etc/pki/tls/certs/localhost.crt", {st_mode=S_IFREG|0600, st_size=1115, ...}) = 0
stat("/etc/pki/tls/private/localhost.key", {st_mode=S_IFREG|0600, st_size=887, ...}) = 0

Please show e.g. the strace output for httpd failing in open().
Comment 4 Kaspar Brand 2012-03-10 06:04:15 UTC
*** Bug 52867 has been marked as a duplicate of this bug. ***
Comment 5 William A. Rowe Jr. 2018-11-07 21:08:27 UTC
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd.

As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd.

If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question.

If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with.

Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.