Forum Moderators: phranque

Message Too Old, No Replies

how does apache run java code

         

apoleks

7:38 pm on Oct 6, 2005 (gmt 0)

10+ Year Member



This must be simple, but it seems like I just cannot do it:

I am using Apache 2.0 on Redhat Enterprise.

I want to be able to run cgi script from a web page. The script calls bash script which runs java code. Both jdk1.5 and java classes are under "/home/my_account/" and cgi script and bash script are in the default "/var/www/cgi-bin" directory.

I can run the script just fine as "root", but not as "apache". If I try to run it within the browser, I get the following error message:

/home/my_account/downloads/jdk1.5.0_05/jre/bin/java: Permission denied

However, if instead of running java code, I do "cat "/home/my_account/some_file", that works, given that security permissions are set on "some_file" (with chcon). That does not work with java though. What is so special about java? What am I doing wrong?

apoleks

8:13 pm on Oct 6, 2005 (gmt 0)

10+ Year Member



Forgot to mention:

I am setting all file permissions for java (and for /home/my_account in general to 755. But even 777 does not work.