Linux - cannot restore segment prot after reloc: Permission denied

I encounter this during my installation of Postgres to CentOS 5.8 - cannot restore segment prot after reloc: Permission denied

This error could happen on any package installation.

SELinux (Security Enchance Linux) provide access control security feature in Linux. See http://en.wikipedia.org/wiki/Security-Enhanced_Linux

Disabling it actually is bad. However, it provides a quick fix to my issues.

You can temporarily or permanent disable SELinux

Temporarily Disable

To disable

/usr/sbin/setenforce 0

To enable

/usr/sbin/setenforce 1

This is temporary SELinux turn off, thus, you do not need to reboot the system.


Permanent Disable

Edit /etc/selinux/config

vi /etc/selinux/config

You will see the following

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=enforcing


Change enforcing to disable

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled


Then, reboot the system.

shutdown -r now



Comments

Post a Comment

Popular Posts