I installed mongodb following this tutorial here, no errors during the installation but when I try to start the mongod server using this command sudo systemctl start m
because the permission setting
chown -R mongodb:mongodb /var/lib/mongodb
chown mongodb:mongodb /tmp/mongodb-27017.sock
if this worked for me after reinstalling mongodb. I have created manually
sudo mkdir /var/lib/mongodb
sudo mkdir /var/log/mongodb
and changed owner for both
sudo chown -R mongodb:mongodb /var/lib/mongodb
chown -R mongodb:mongodb /var/log/mongodb