LinuxQuestions.org
Visit Jeremy's Blog.
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 04-19-2011, 09:41 AM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Question Database Can't Use My SSL Certificates


I've installed PostgreSQL on Arch Linux & also self generated self signed certificates in /etc/ssl/ directory. My PostgreSQL 'data' directory is /var/lib/postgres/data & I've edited my postgresql.conf file to use SSL however I'm having permission / access problems starting my database using SSL. It can't access the certificates and errors out when I try and start the database engine:

Code:
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down
FATAL:  could not load server certificate file "server.crt": No such file or directory
FATAL:  private key file "server.key" has group or world access
DETAIL:  Permissions should be u=rw (0600) or less.
FATAL:  could not access private key file "server.key": Permission denied
FATAL:  could not access private key file "server.key": Permission denied
FATAL:  could not access private key file "server.key": Permission denied
FATAL:  could not load private key file "server.key": Permission denied
My /etc/ssl permissions are as follows:

Code:
[root@ghost ssl]# ls -l
total 28
drwxr-xr-x 2 root root  4096 Apr 18 22:28 certs
drwxr-xr-x 2 root root  4096 Feb  8 13:58 misc
-rw-r--r-- 1 root root 10819 Feb  8 13:58 openssl.cnf
drwxr-xr-x 2 root root  4096 Apr 18 22:28 private
-rw-r--r-- 1 root root  1813 Apr 18 22:27 server.csr
The individual certificate permissions are as follows:

Code:
[root@ghost ssl]# ls -l certs/server.crt 
-rw-r--r-- 1 root root 2126 Apr 18 22:27 certs/server.crt
[root@ghost ssl]# ls -l private/server.key 
-rw------- 1 root root 3311 Apr 18 22:25 private/server.key
I don't know what I need to chown or chmod in order to get PostgreSQL to access my self signed certificates. If anyone could please help me out, I would greatly appreciate it.
 
Old 04-19-2011, 03:32 PM   #2
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Quote:
FATAL: private key file "server.key" has group or world access
ssl will never ever touch something with world readable cert at all. change it to 600.
 
Old 04-20-2011, 09:48 AM   #3
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
Quote:
Originally Posted by ozanbaba View Post
ssl will never ever touch something with world readable cert at all. change it to 600.
The certificates or the symbolic links? My certificates and parent directories are as follows:

Code:
[root@ghost ssl]# pwd
/etc/ssl

[root@ghost ssl]# ls -l
total 28
drwxr-xr-x 2 root root  4096 Apr 19 13:27 certs
drwxr-xr-x 2 root root  4096 Feb  8 13:58 misc
-rw-r--r-- 1 root root 10819 Feb  8 13:58 openssl.cnf
drwx------ 2 root root  4096 Apr 19 13:27 private
-rw-r--r-- 1 root root  1115 Apr 19 13:22 server.csr
[root@ghost ssl]# cd certs/

[root@ghost certs]# ls -l
total 8
-rw-r--r-- 1 root root 2439 Apr 19 13:27 ghost_ssl.crt

[root@ghost certs]# ls -l ../private/ghost_ssl.key 
-rw------- 1 postgres postgres 1704 Apr 19 13:22 ../private/ghost_ssl.key
 
Old 04-20-2011, 11:58 AM   #4
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
I'm talking about certs. SSL will refuse to use a private cert with world or group readable.
 
  


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
Can SSL Certificates be the same sleepyz Linux - Server 6 02-19-2010 10:52 AM
SSL Certificates irvinew31 SUSE / openSUSE 2 10-03-2006 10:27 AM
SSL Certificates SBN Linux - Security 1 09-30-2006 03:29 AM
SSL certificates the-chains Linux - Software 0 11-15-2004 07:12 PM
ssl certificates Syncrm Linux - General 7 02-26-2003 10:01 AM

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

All times are GMT -5. The time now is 11:15 PM.

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