views:

154

answers:

3

We have a vendor application where we download their updates and deploy a war file. We are deploying the war file on a unix application server running oracle application server 9i. I believe when we deploy the war file, we remove the previous install and then deploy the new war file. When we deploy the war file, sometimes we have to manually set the unix file permissions for the class and other files. We do this so all the unix user ids can run the processes they need. Is there a better way to do this?

A: 
Steven Mackenzie
The war file is deployed and the files are owned by a user id oracleas and the group is dba. The deployed file permissions are 750 (rwxr-x---). We have a unix id r6schd that is not part of the dba group that runs a batch process that is part of the deployed application. We are having to set the directory permissions for the deployed app to 755(rwxr-xr-x) and the app files below them as appropriate. I know we could add the r6schd user id to the dba group, but the app dba does not want to do this. So I am looking for a better way to get the permissions set correct on deploy.
Chris G
A: 

Based on your comment to Steven's answer, how about setting umask to 000 for the user that deploys the war file? (This would be oracleas, the umask variable is often set in the .profile of that user.) The umask (which is now probably set to 027) masks out file permissions, 000 does not mask out anything, resulting in permissions for others.

rsp
umask 000 is a bad idea. You should at least mask out group / other write.
Stephen C
@Steven, yes as a general rule you are right. Given his problem though (he is looking for another way to chmod the files back to having other's permissions) it is the first step to either a solution or to narrow down the possibilities. Either way I do not think a downvote is warranted.
rsp
A: 

Just a few HINTs: There is no way to set file permissions within a war/jar.

The permissions depend on the oracleas user's umask. Change that and you'll be all set.

Is there a way you can keep the war packaged?

ring bearer
Thank you for the response. Why would you want to keep the war file packaged?
Chris G