CentOS: cannot restore segment prot after reloc: Permission deniedとのエラー

Post date: 2011/07/20 5:19:46

Original: http://d.hatena.ne.jp/ni-man/20070903

SELinuxポリシーが適用されて、エラーの出たライブラリ

セキュリティコンテキストが適切に設定されていない」ことを意味するそうです。

そこで、root権限で以下のコマンドで、変更

chcon -c -v -R -u system_u -r object_r -t textrel_shlib_t libphp5.so

これで、OK!!

In ALTA's case, the error was:

/home/anagix/anagix_tools/lib/ruby/site_ruby/1.8/i686-linux/qtruby4.so: /home/anagix/anagix_tools/lib/libqtruby4shared.so.2: cannot restore segment prot after reloc: Permission denied - /home/anagix/anagix_tools/lib/ruby/site_ruby/1.8/i686-linux/qtruby4.so (LoadError)

The command below worked:

chcon -c -v -R -u system_u -r object_r -t textrel_shlib_t /home/anagix/anagix_tools/lib/libqtruby4shared.so.2 /home/anagix/anagix_tools/lib/ruby/site_ruby/1.8/i686-linux/qtruby4.so