Centos 6.3 PERL CGI selinux file read access

Posted by Steed on Server Fault See other posts from Server Fault or by Steed
Published on 2012-09-20T16:29:55Z Indexed on 2012/09/22 21:40 UTC
Read the original article Hit count: 463

Filed under:
|
|
|
|

I have a CGI script called index.cgi

It is trying to read a log file called 10.128.0.242.2012.sep.20.downloaded.txt under the path /var/log/trafcount/

It appears that it is being blocked by selinux.

The audit log shows something like

type=AVC msg=audit(1348158321.873:1472116): avc: denied { read } for pid=11620 comm="index.cgi" name="10.128.0.242.2012.sep.20.downloaded.txt" dev=dm-0 ino=395264 scontext=unconfined_u:system_r:httpd_sys_script_t:s0 tcontext=unconfined_u:object_r:var_log_t:s0 tclass=file

How can I allow this script full access to all files under /var/log/trafcount ?

© Server Fault or respective owner

Related posts about perl

Related posts about apache2