LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-08-2018, 10:11 AM   #1
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 195

Rep: Reputation: Disabled
Permission denied: Init: Can't open server private key file


Running rhel 6.10
Just ran updates and since then, selinux 1 time stopped httpd from starting, even though the booleans look correct. Set selinux to permissive and httpd started, then setenforce back to 1 and it would good. About a week later, httpd died with error: httpd dead but pid file exists.

httpd/error_log showed me this: Permission denied: Init: Can't open server private key file

Seems to me that selinux may be the issue and that restorecon -RvF /etc/ssl/certs/
may be the answer. However, if someone has other thoughts, let me know.

Otherwise, I'd like to know what I would be walking into with using this command.

Thanks!
 
Old 10-09-2018, 12:39 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Quote:
httpd/error_log showed me this: Permission denied: Init: Can't open server private key file

Seems to me that selinux may be the issue and that restorecon -RvF /etc/ssl/certs/
may be the answer. However, if someone has other thoughts, let me know.

Otherwise, I'd like to know what I would be walking into with using this command.
Running restorecon is the correct way to fix certs files permissions/context, so they can be used by httpd.

Regards
 
Old 10-09-2018, 08:20 AM   #3
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 195

Original Poster
Rep: Reputation: Disabled
Ok, so, after I run it, what are the next steps? Linux always has next steps!
 
Old 10-09-2018, 08:59 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Quote:
Originally Posted by vinmansbrew View Post
Ok, so, after I run it, what are the next steps? Linux always has next steps!
You should (re)start the httpd service.
 
Old 10-09-2018, 09:32 AM   #5
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 195

Original Poster
Rep: Reputation: Disabled
Hmm, that just seems too easy. I mean, I knew I had to restart the service, but I figured that there would be more hoops!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dumping master file: tmp-q05vQjwQ18: open : permission denied To learn Linux - Newbie 1 09-06-2016 12:35 AM
can't open file for /var/named/reverse.zone for reading (permission denied) ngiw2012 Linux - General 1 08-11-2014 05:50 AM
open lock file /var/lib/postfix/master.lock: cannot open file: Permission denied gabsik Linux - Server 6 08-30-2012 09:39 PM
Apache 2 - RHEL4u5 - Permission denied: httpd: could not open error file vishwakumarbg Other *NIX 4 09-15-2008 02:36 PM
cannot open shared object file: Permission denied cchristian Linux - Software 5 07-30-2005 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration