Article:How to resolve the "cannot restore segment prot after reloc: Permission denied" problem?


The problem arises when SELinux (NSA Security-Enhanced Linux) is enabled and in Enforcing mode. This error mostly occur when accessing shared libraries. To find out the current mode, run

# getenforce

One may either disable SELinux by setting selinux=disable in /etc/selinux/config (reboot required) or set SELinux to Permissive mode by running

# setenforce Permissive

On Fedora, setenforce is under /usr/sbin.

A better approach would be to change the security context of the shared libraries in question using the chcon command:

# chcon -t texrel_shlib_t *.so

To change all shared libraries under a directory:

# find <dir> -type f -name "*.so" | xargs chcon -t shlib_t


Most Recent

Most Popular

Most Active Categories




Back To Top Add New Article Printable Page

MediaWiki

This page has been accessed 1,207 times.

This page was last modified 06:07, 31 March 2009.