最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

oraclelinux - Not able to execute system command from java code if selinux is enabled in enforcing mode - Stack Overflow

programmeradmin1浏览0评论

I have enabled selinux on oracle linux 8.9 system. enitre system is stable and has appropriate contexts for all files and processes but in few scenarios wherever my java code has some system level command execution it is failing.

com.mi.myservice.MIConfigException: errorCode = 1039: Error while executing system command '/usr/bin/pgrep': code 1, output = '

I do not see any SELinux denial errors in audit.log. All places in my code where i am trying to execute system commands from java code it is failing.

the java process have initrc_t context and in this example case pgrep process have bin_t context since it is at /usr/bin location. any suggestions?

I cannot find any error logs anywhere except the tomcat logs which i shared, i have tried enabling httpd_execmem boolean but that also did not solve issue

发布评论

评论列表(0)

  1. 暂无评论