I am new to PostgreSQL and stuck on an issue that PostgreSQL isn't starting up. It reported:

FATAL: could not open log file "/path/to/log/filesystem/postgresql-Sun.log": No such file or directory
06:52:32.530 UTC [7440] LOG: database system is shut down

I tried to find the solution online and changed the permission of the postgres user using chown, but that also didn't help or maybe I missed something.

Please advise.

2 Answers 2


Make sure that user postgres has "read" (r) and "execute" (x) permissions on all directories on the path, and (additionally) "write" (w) permissions on the last directory.


User, which runs postgresql, often postgres, must be able to traverse to this /path/to/log/filesystem/ (often /var/log/postgresql), specified by log_directory config option and be able to write files there. If this path does not exist, you will get No such file or directory error.

You can try switching to this user (e.g. su postgres) and check cd /path/to/log/filesystem (whatever this path really is) and if that throws error, then create the directories (e.g. mkdir -p /path/to/your/log_directory).

There's also a possibility that service manager changes mount points for the service, like systemd is capable of.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.