linux - How and why does "setenforce 0" allow Java 7 to run? -
linux - How and why does "setenforce 0" allow Java 7 to run? -
i've made changes on programme i'm working on , i've updated java java 6 java 7.
i running programme on centos 5.8 32-bit vm.
before java update worked fine.
now process isn't starting error:
[root@centos-58-i-0 bin]# ./agent.sh start starting agent.....d. running (23442). error: dl failure on line 864 error: failed /agent/jre/lib/i386/client/libjvm.so, because /agent/jre/lib/i386/client/libjvm.so: cannot restore segment prot after reloc: permission denied
i've checked online , solution/workaround run command:
setenforce 0
and work.
reading documentation on setenforce
command, didn't understand , how did solve problem.
so questions are:
what may cause error prevents me starting process? whysetenforce
command solve it? please give short explanation of setenforce
in general.
1) may cause error prevents me starting process ?
this problem caused selinux enforcing access policy forbids application changing memory protection attributes of memory segment
centos, fedora, scientific linux , redhat entrprise linux have selinux set "enforcing" mode default.
2) why setenforce command solves ?
3) short explanation of setenforce in general
running setenforce 0
switching selinux "permissive" mode.
this "fixes" problem, not thought if scheme exposed. thought of selinux targeted access policies protect scheme limiting things exposed services can ... if hacked, example. have turned protection off.
a improve approach to:
check security / audit logs, figure out triggered avc alert decide if safe service doing figure out temporary prepare usingchcon
alter relevant security context or flags. implement permanent prepare adding local policy override. but need selinux skills / knowledge pull off.
in particular case, alternative (and less dangerous) "quick fix" run this:
# chcon -t textrel_shlib_t /agent/jre/lib/i386/client/libjvm.so
but note temporary security context alter made using chcon
undone if need restorecon
.
java linux java-7 selinux
Comments
Post a Comment