KB Article #188560
Update to September 2024 fails with 'Failed to initdb'
Problem
In some situations when attempting an upgrade to September 2024 the below error message appears:
ERROR Failed to deploy internal postgresql
com.axway.st.delivery.update.patch.custom.datamigration.DataMigrationException: Failed to initdb! -bash: /opt/Axway/SecureTransport/postgresql/bin/initdb: Permission denied
at com.axway.st.delivery.update.patch.custom.utils.InternalDatabaseUtils.initInternalDb(InternalDatabaseUtils.java:505) ~[?:?]
at com.axway.st.delivery.update.patch.custom.InternalDBMigration.executeMigration(InternalDBMigration.java:106) [?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
at InternalDBMigrationMain.main(InternalDBMigrationMain.java:23) [SecureTransport-Update-5.5-20240926-3213-allOS.jar:?]
Resolution
This happens when the umask requirements for a root installation of SecureTransport were not met. Reference: Requirements for installing on Linux.
If a umask that limits the group access is used, for example 027 or 077, then the upgrade fails and the error is thrown in the console.
The default umask globally on the server must be 022.
To resolve this you can modify the ACL manually to add rwx permissions for the user and rx permissions for the group of the newly created database user - stdbuser - with the following command:
setfacl -R -m u:stdbuser:rwx /opt/Axway; setfacl -R -m g:stdbuser:rx /opt/Axway
Replace /opt/Axway with your SecureTransport installation directory.
After executing the command rerun the update and the "Permission Denied" error message should be gone.