Why does Red Hat Satellite 5.6 installation fail with SELinux errors when using a separate filesystem for the PostgreSQL database?
Issue
- When installing Satellite 5.6 using the embedded PostgreSQL database I get the following error message:
* Setting up Selinux..
** Database: Setting up database connection for PostgreSQL backend.
** Database: Installing the database:
** Database: This is a long process that is logged in:
** Database: /var/log/rhn/install_db.log
*** Progress: #
Could not install database.
- Checking the resulting
/var/log/rhn/install_db.log
log file shows that the installer is complaining about incorrect security context in/var/lib/pgsql
:
# cat /var/log/rhn/install_db.log
The directory "/var/lib/pgsql" does not seem to have correct SELinux context.
Please fix the SELinux context by running:
restorecon -Rv /var/lib/pgsql
- Security contexts in
/var/lib/pgsql
seem correct:
# ls -ldZ /var/lib/pgsql
drwx------. postgres postgres system_u:object_r:postgresql_db_t:s0 /var/lib/pgsql
#
# ls -lZ /var/lib/pgsql
drwx------. postgres postgres system_u:object_r:postgresql_db_t:s0 backups
drwx------. postgres postgres system_u:object_r:postgresql_db_t:s0 data
drwx------. root root system_u:object_r:lost_found_t:s0 lost+found
-rw-------. postgres postgres unconfined_u:object_r:postgresql_log_t:s0 pgstartup.log
- Applying the command suggested by
/var/log/rhn/install_db.log
changes the security context oflost+found
directory and allows the installation to proceed.
# restorecon -Rv /var/lib/pgsql
restorecon reset /var/lib/pgsql/lost+found context system_u:object_r:lost_found_t:s0->system_u:object_r:postgresql_db_t:s0
- Should not
lost-found
directory havesystem_u:object_r:lost_found_t:s0
security context?
Environment
- Red Hat Satellite 5.6
- Embedded PostgreSQL database.
- Separate
/var/lib/pgsql
filesystem. - selinux-policy version .
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.