Postgres Database Install fails with Permission error: Error running /tmp/postgresql_installer_6dd168a903/prerun_checks.sh : /bin/sh: /tmp/postgresql_installer_6dd168a903/prerun_checks.sh: Permission denied

Document ID : KB000056707
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Postgres Database Install fails with Permission error: Error running /tmp/postgresql_installer_6dd168a903/prerun_checks.sh : /bin/sh: /tmp/postgresql_installer_6dd168a903/prerun_checks.sh: Permission denied

No database logs are created.

 

Solution:  

Mount /tmp with the write permission (default permission) .

During the Postgres installation, ./postgresql-9.2.4-1-linux-x64.run is executed.

 

(Command with arguments ./postgresql-9.2.4-1-linux-x64.run --serverport 5432 --mode unattended --unattendedmodeui none --prefix /dbdir --datadir /dbdir/data --superpassword postgres )

 

This creates prerun_checks.sh (in /tmp/postgresql_installer_6dd168a903/). Prerun_checks.sh verifies if having write permission for /tmp directory.

 

If not having write permission, then the postgres installation fails with the below error message:


Error running /tmp/postgresql_installer_6dd168a903/prerun_checks.sh : /bin/sh: /tmp/postgresql_installer_6dd168a903/prerun_checks.sh: Permission denied

So when mounting /tmp, ensure that you are mounting with write permission (default permission).  This helps resolve the problem above.