PostgreSQL won't start: “server.key” has group or world access

后端 未结 6 1681
时光取名叫无心
时光取名叫无心 2021-01-30 09:32

Whenerver I start PostgreSQL using command:

$ sudo /etc/init.d/postgresql start

Pg doesn\'t start up. The error reported is:

          


        
6条回答
  •  抹茶落季
    2021-01-30 09:44

    How about not to hard copying the Server Key and leaving it where and like it is.

    Instead it is simplier to:

    Change the "server.key" link Permissions in PostgreSQL Data Directory (its the Location where the Link to the private certificate.key File resides)

    # cd /var/lib/postgresql/9.1/main/

    to

    # chown -R postgres:postgres server.key`
    

    And make sure that the original Certificate in

    # /etc/ssl/private/ssl-cert-snakeoil.key
    

    has those Properties, by Setting them

    # chmod 640 ssl-cert-snakeoil.key
    # chown root:ssl-cert ssl-cert-snakeoil.key
    

    This Solution has been tested on Debian. Please remember that CentOS can use the SELinux with extended User Rights Management, which can be viewed by

    # ls -laZ *
    

提交回复
热议问题