FATAL: could not access private key file “/etc/ssl/private/ssl-cert-snakeoil.key”: Permission denied

前端 未结 6 2755
长情又很酷
长情又很酷 2021-02-20 02:37

I believe I ended up mixing up permissions at /etc/ssl directories tree as the last modification was made on 18th November and a day after I could not get my PostgreSQL to work.

6条回答
  •  忘掉有多难
    2021-02-20 03:07

    Try adding postgres user to the group ssl-cert

    Run the below code to fix your issue:

    # > It happened to me and it turned out that I removed erroneously the postgres user from "ssl-cert" group, set it back with
    sudo gpasswd -a postgres ssl-cert
    
    # Fixed ownership and mode
    sudo chown root:ssl-cert  /etc/ssl/private/ssl-cert-snakeoil.key
    sudo chmod 740 /etc/ssl/private/ssl-cert-snakeoil.key
    
    # now postgresql starts! (and install command doesn't fail anymore)
    sudo /etc/init.d/postgresql start
    

    courtsey to GabLeRoux

提交回复
热议问题