All pastes #42139 Raw Edit

Miscellany

public text v1 · immutable
#42139 ·published 2006-02-19 16:31 UTC
rendered paste body
I have a basic "hello world" script that runs fine from the shell if I type "# perl test.pl". If I do a "# chmod 777 test.pl" then type "# ./test.pl", I get no output whatsoever. The only thing I get is this clue in /var/log/messages: 

Feb 19 08:19:11 sandbox kernel: audit(1140365951.074:36): avc:  denied  { read write } for  pid=29526 comm="test.pl" name="0" dev=devpts ino=2 scontext=root:system_r:httpd_sys_script_t tcontext=root:object_r:initrc_devpts_t tclass=chr_file
Feb 19 08:19:11 sandbox kernel: audit(1140365951.074:37): avc:  denied  { use } for  pid=29526 comm="test.pl" name="0" dev=devpts ino=2 scontext=root:system_r:httpd_sys_script_t tcontext=user_u:system_r:initrc_t tclass=fd
Feb 19 08:19:11 sandbox kernel: audit(1140365951.074:38): avc:  denied  { use } for  pid=29526 comm="test.pl" name="0" dev=devpts ino=2 scontext=root:system_r:httpd_sys_script_t tcontext=user_u:system_r:initrc_t tclass=fd
Feb 19 08:19:11 sandbox kernel: audit(1140365951.074:39): avc:  denied  { use } for  pid=29526 comm="test.pl" name="0" dev=devpts ino=2 scontext=root:system_r:httpd_sys_script_t tcontext=user_u:system_r:initrc_t tclass=fd

I suspect SELinux may be responsible, but really have no experience with it so have no idea.

Thanks.


#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "Hello World (perl)\n\n";