Skip to main content

This article tells you what to do if, after a successful install, running runcobol produces the error "cannot restore segment prot after reloc: Permission denied."

Problem:

After a successful install, running runcobol produces the error "cannot restore segment prot after reloc: Permission denied."

Resolution:

There are several issues that can cause this error:


  • This message can apparently be returned if SELinux is enabled.

    Unless you are SELinux experts, we suggest that you disable SELinux (see the URL link) and make sure that the problem no longer occurs. Then try the suggestion given at this URL of using "chcon" to change the security context for the shared objects.

  • Next, you might be having an issue with the permissions on the directories in the runcobol path.

    All of the directories in the path need to have "execute" permissions.

  • If that doesn't work, you may have to uninstall and reinstall with SELinux disabled.

The following paragraphs are extracted from technical tips found at the Web site pointed to by the URL:

Newer Linux distributions have enabled new kernel security extensions from the SELinux project at the NSA. These extensions allow finer-grained control over system security. However, SELinux also changes some default system behaviors, such as shared library loading, that can be problematic to third party programs.

If you receive the error message "cannot restore segment prot after reloc: Permission denied" when launching IDL, then your SELinux configuration is preventing IDL from launching.

To rectify this issue, you can either:

Change the default security context for IDL by issuing the command:

chcon -t 
texrel_shlib_t /usr/local/rsi/idl_6.1/bin/bin.linux.x86/*.so

Disabling SELinux altogether by setting the line

SELINUX=disabled

in your /etc/sysconfig/selinux file.

For more information about SELinux, please consult your Linux distribution vendor.

Incident Number: 2261111

Old KB# 14123