I did an update of NextCloud today and did a reinstall from scratch to use the new recommendations for the 4 datasets under nextcloud.
Here’s the full log from the postgres pod, but basically it appears to want to have user postgres own the postgres database, but there was nothing in the instructions about having to create a new postgres user and setting ownership of that postgres user.
So either the software is confused or the documentation is wrong.
What’s the solution?
2024-06-24 23:26:42.561866-07:00The files belonging to this database system will be owned by user “postgres”.
2024-06-24 23:26:42.561918-07:00This user must also own the server process.
2024-06-24 23:26:42.561929-07:002024-06-24T23:26:42.561929334-07:00
2024-06-24 23:26:42.561961-07:00The database cluster will be initialized with locale “en_US.utf8”.
2024-06-24 23:26:42.561982-07:00The default database encoding has accordingly been set to “UTF8”.
2024-06-24 23:26:42.561997-07:00The default text search configuration will be set to “english”.
2024-06-24 23:26:42.562024-07:002024-06-24T23:26:42.562024042-07:00
2024-06-24 23:26:42.562039-07:00Data page checksums are disabled.
2024-06-24 23:26:42.562071-07:002024-06-24T23:26:42.562071848-07:00
2024-06-24 23:26:42.562137-07:00fixing permissions on existing directory /var/lib/postgresql/data … ok
2024-06-24 23:26:42.563368-07:00creating subdirectories … ok
2024-06-24 23:26:42.563530-07:00selecting dynamic shared memory implementation … posix
2024-06-24 23:26:42.633349-07:00selecting default max_connections … 20
2024-06-24 23:26:42.863201-07:00selecting default shared_buffers … 400kB
2024-06-24 23:26:42.863249-07:00selecting default time zone … UTC
2024-06-24 23:26:42.864622-07:00creating configuration files … ok
2024-06-24 23:26:42.883708-07:002024-06-25 06:26:42.883 UTC [69] FATAL: data directory “/var/lib/postgresql/data” has wrong ownership
2024-06-24 23:26:42.883774-07:002024-06-25 06:26:42.883 UTC [69] HINT: The server must be started by the user that owns the data directory.
2024-06-24 23:26:42.893279-07:00child process exited with exit code 1
2024-06-24 23:26:42.893343-07:00initdb: removing contents of data directory “/var/lib/postgresql/data”
2024-06-24 23:26:42.896390-07:00running bootstrap script …