posted 20 years ago
Hello All I have a interesting situation where I'm trying to run a shell script test.sh from my web application (I have already informed my client of the security risk assocaited with this).
I'm trying to do a simple chmod 777 before I try to execute the shell script to insure that it has the execute bit is set.
So I do something similar to the below.
Process proc0 = Runtime.getRuntime().exec("chmod 777 test.sh");
//i check the file permissions using the os and it is changed
Process proc1 = Runtime.getRuntime().exec("test.sh");
//doesn't work
BUT if I run the same statements again from a 2nd web page IT works.
It's like in the same request that chmod mod didn't take effect, even though at the OS level it did?
Anyone have any ideas?
Thanks,
Coop
[ May 13, 2004: Message edited by: B Cooper ]