Howdy,
Specify the full path to chmod.  Your Runtime.exec calls will only have
a
limited environment inherited.

If you're not running tomcat explicitly with a security manager, you
don't need to worry about the policy as it's not consulted anyways.  Of
course, since you're running tomcat as root we can only assume you don't
care much for security.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Keshav Sarin [mailto:[EMAIL PROTECTED]
>Sent: Thursday, January 08, 2004 3:20 PM
>To: [EMAIL PROTECTED]
>Subject: Invoking script from TC 5.0.16
>
>I have configured TC 5.0.16 on Linux. In a JSP, using RunTime.exec(),
>I'm trying to run a bash script that changes the mode of a file. I get
>the following exception in the logs:
>
>java.io.IOException: chmod : not found.
>
>If the "chmod" line is commented in the script or when the script is
>run from console, there are no errors.
>
>Is there any permission issue here? TC runs as root.
>
>I read some earlier posts that lead me to using security-manager
>policy. I tried the following setting in catalina.policy and restarted
>TC with security flag but didn't help.
>
>grant codeBase "file:${catalina.home}/webapps/myapp/-" {
>      permission java.security.AllPermission;
> };
>
>
>Thanks
>Keshav
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to