Tomcat deploy: make included scripts executable

Posted by AlexS on Stack Overflow See other posts from Stack Overflow or by AlexS
Published on 2012-02-12T13:08:17Z Indexed on 2013/10/29 21:56 UTC
Read the original article Hit count: 247

Filed under:
|
|

I'm devellopping a WebApplication (for Tomcat) using netbeans on Windows 7. For the Webapplication to run I need to run a insall-script once.

This script (*.bat for windows and *.sh for linux is included in my war-file (WEB_INF).

Now everytime I deploy the WAR-file and want to run the script on linux I have to call

chmod +x install.sh

first.

Is there a way that this script can be made executable by default? I don't want to have to execute some extra commands after the deploy to make the script executable.

For clarification: I'm not new to Linux and I know how to set executable-rights on files. That's not the problem. My problem is: What do I have to do, so that this script is executable right after tomcat deployed my *.war-file (unpacked it). If I would be using Linux for development as well, I would try to set the rights according in my sources (maybe I'll try it when I have a little more spare time). But I am using Windows and netbeans.

Are there any attributes I can set to achive my goal, or is it possible to achive this using ant?

By the way: Are there security related issues with this approach? The script looks for java executable and calls a javabased GUI-installer...

© Stack Overflow or respective owner

Related posts about linux

Related posts about tomcat