在docker中启动postgresql时出现错误 FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied
试了很多办法,其中有改变该文件权限,将该文件的属主改为postgres或者将postgres加入用户组ssl-cert 中,均无法解决,最后在谷歌中找到了答案
解决方法:
mkdir /etc/ssl/private-copy; mv /etc/ssl/private/* /etc/ssl/private-copy/; rm -r /etc/ssl/private; mv /etc/ssl/private-copy /etc/ssl/private; chmod -R 0700 /etc/ssl/private; chown -R postgres /etc/ssl/private