Build a Student Database: Part 1- Postgres Down

Tell us what’s happening:

Postgres would not start so I worked around and did the following
I rant the following since it was complaining about permissions on the directory

  1. sudo chmod 775 /var/run/postgresql
  2. Ran pg_ctl start and got a different error : FATAL: could not create lock file “/var/run/postgresql/.s.PGSQL.5432.lock”: Permission denied
  3. I tried editing permissions on the directory but I couldn’t since the directory was owned by postgres so I did a sudo to postgres and changed the directory permissions
    chmod 777 /var/run/postgresql
  4. Ran pg_ctl start and Postgres started but all my work was gone and freecodecamp user didn’t exist anymore

Wanted to see if anyone had something similar happen and if they were able to recover the students database created in this project.

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

Learn Bash Scripting by Building Five Programs - Build Five Programs

Welcome back to the forum @spenagca

Did you manage to start CodeRoad?

Happy coding

Yes, I tried starting the process again today and it seems like my work was restored. Thank you!

1 Like