Если вы случайно поменяли права на директорию /etc и её содержимое.

Как я исправил обратно не помню, но помню что гуглил и менял обратно права. Но лучше советовали переустановить систему, если вам это не накладно.

Мне было лень переустанавливать и поэтому погуглив нашел пару инструкций выполнив которые я надеялся что вернул все на свои места.

Но вот вчера обнаружил, что не могу подключиться к PostgreSQL. Параллельно заметил, что у меня есть зависшие Vagrant. Я их не смог выгружить через vagrant destroy. Там было много ошибок и я думал, что это как-то связано. Но потом подумал, что возможно эта проблема никак не относится к Постргесс. Возможно это из-за того, что я установил новый виртуалбокс пока вагрант был запущен и тепер я не могу нормально удалить вагрант.

Есть такая команда 

pg_lsclusters

Она показывает рабочие кластеры. Запустил эту команду, а так путь к логу. Открыл лог и вижу такую ошибку:

Fix postgresql error FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied

Не сразу до меня дошло, что это из-за моей случайной опечатки в прошлом, когда я сменил права на директорию /etc/

Нашел решение тоже в гугле: https://gist.github.com/GabLeRoux/0c60f9be0c28b6b41f64cb55474b0ccb#file-fix-ssl-cert-snakeoil-key-ubuntu-postgresql-sh-L5

 

# > It happened to me and it turned out that I removed erroneously the postgres user from "ssl-cert" group, set it back with
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

комментарии (11)

Mavis Mutch Mavis Mutch 2021-01-23 22:21:26
It is with sad regret to inform you StarDataGroup.com is shutting down. It has been a tough year all round and we decided to go out with a bang! Any group of databases listed below is $49 or $149 for all 16 databases in this one time offer. You can purchase it at www.StarDataGroup.com and view samples. - LinkedIn Database 43,535,433 LinkedIn Records - USA B2B Companies Database 28,147,835 Companies - Forex Forex South Africa 113,550 Forex Traders Forex Australia 135,696 Forex Traders Forex UK 779,674 Forex Traders - UK Companies Database 521,303 Companies - German Databases German Companies Database: 2,209,191 Companies German Executives Database: 985,048 Executives - Australian Companies Database 1,806,596 Companies - UAE Companies Database 950,652 Companies - Affiliate Marketers Database 494,909 records - South African Databases B2B Companies Database: 1,462,227 Companies Directors Database: 758,834 Directors Healthcare Database: 376,599 Medical Professionals Wholesalers Database: 106,932 Wholesalers Real Estate Agent Database: 257,980 Estate Agents Forex South Africa: 113,550 Forex Traders Visit www.stardatagroup.com or contact us with any queries. Kind Regards, StarDataGroup.com
Mellissa MacKillop Mellissa MacKillop 2021-02-02 20:52:50
It is with sad regret to inform you StarDataGroup.com is shutting down. Fire sale till the 7th of Feb. Any group of databases listed below is $49 or $149 for all 16 databases in this one time offer. You can purchase it at www.StarDataGroup.com and view samples. - LinkedIn Database 43,535,433 LinkedIn Records - USA B2B Companies Database 28,147,835 Companies - Forex Forex South Africa 113,550 Forex Traders Forex Australia 135,696 Forex Traders Forex UK 779,674 Forex Traders - UK Companies Database 521,303 Companies - German Databases German Companies Database: 2,209,191 Companies German Executives Database: 985,048 Executives - Australian Companies Database 1,806,596 Companies - UAE Companies Database 950,652 Companies - Affiliate Marketers Database 494,909 records - South African Databases B2B Companies Database: 1,462,227 Companies Directors Database: 758,834 Directors Healthcare Database: 376,599 Medical Professionals Wholesalers Database: 106,932 Wholesalers Real Estate Agent Database: 257,980 Estate Agents Forex South Africa: 113,550 Forex Traders Visit www.stardatagroup.com or contact us with any queries. Kind Regards, StarDataGroup.com
Lashay Roberson Lashay Roberson 2021-02-16 07:01:14
Use SendBulkMails.com to run email campaigns from your own private dashboard. Cold emails are allowed and won't get you blocked :) - 1Mil emails / mo @ $99 USD - Dedicated IP and Domain Included - Detailed statistical reports (delivery, bounce, clicks etc.) - Quick and easy setup with extended support at no extra cost. - Cancel anytime! Regards, www.SendBulkMails.com
Barbra Wallwork Barbra Wallwork 2021-02-23 20:55:22
Do you need more clients? We have amazing databases starting at $9.99 until the end of the Month! Visit us at StarDataGroup.com
SendBulkMails.com SendBulkMails.com 2021-02-26 03:51:00
SendBulkMails.com allows you to reach out to clients via cold email marketing. - 1Mil emails starter package - Dedicated IP and Domain Included - Detailed statistical reports (delivery, bounce, clicks etc.) - Quick and easy setup with extended support at no extra cost. - Cancel anytime! SendBulkMails.com
Dexter Hibner Dexter Hibner 2021-03-09 08:21:41
Hey, Listen, business is tough right now for most people. Does this sound like your situation? -Not enough quality leads? -Not enough revenue? -Always looking for more business? -Working too hard? I have the solution to help make this a great year for your business. I will show you how to Drive Revenue, Sales and Commissions...during the day and more importantly while you sleep... ==> https://sesforyou.com Regards, SesForYou.com
Cleo Erlikilyika Cleo Erlikilyika 2021-03-25 09:08:37
Hello, BestLocalData.com has a special package you get any group of databases for $49 or $249 for all 16 databases and unlimited emails for a year(Domain, IP, Dashboard included). You can purchase it on BestLocalData.com and see samples if you are interested.
Kacey Clibborn Kacey Clibborn 2021-03-28 12:48:24
Your All In One Solution For Creating All The Content You'll Ever Need. Proprietary AI Turns YouTube Videos Into Traffic Getting Articles At The Press Of A Button! We’ve Been Getting Free Autopilot Traffic From Google Without SEO Experience For Over 2 Years By Converting Others YouTube Videos Into Articles… https://warriorplus.com/o2/a/gmvfs/0
Hayley Chapin Hayley Chapin 2021-03-29 15:16:48
Need extra income? A fully hosted, done for you content + monetisation and a stunning design web based software that creates a fully automated done for you cryptocurrency affiliate site, Visit us: https://warriorplus.com/o2/a/f5s4y/0
Trevor Oppen Trevor Oppen 2021-04-08 10:24:27
Hey, It was nice speaking to you the other day, this is the service I was telling you about that helped us boost our ROI almost 2000% Its a company called Lifemail.studio sorry it took so long to get back to you. They allow you to send any email doesn't matter what. We dealt with a guy named Michael, he was friendly and got us setup really quickly. Regards, Trevor
Arturo Eddie Arturo Eddie 2021-04-14 02:11:35
Hello, Send unlimited emails to unlimited lists with one click and no monthly fees! $99 once off! LifeMailNow.com