部署war文件时设置unix权限的更好方法
我们有一个供应商应用程序,我们可以在其中下载他们的更新并部署一个 war 文件。我们正在运行 oracle 应用程序服务器 9i 的 unix 应用程序服务器上部署 war 文件。我相信当我们部署 war 文件时,我们会删除以前的安装,然后部署新的 war 文件。当我们部署war文件时,有时我们必须手动设置类和其他文件的unix文件权限。我们这样做是为了让所有 UNIX 用户 ID 都可以运行他们需要的进程。有更好的方法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只是一些提示:
无法在 war/jar 中设置文件权限。
权限取决于 oracleas 用户的 umask。改变它并且
你就准备好了。
有什么办法可以让战争顺利进行吗?
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?
我对 OAS 不太了解...但我假设从 war 文件解压出来的文件将由运行 OAS 的用户拥有和访问。这不正确吗?您能否更多地解释一下实际发生的情况或为什么这是一个问题?
根据您在下面的补充评论...
听起来您的安全模型根本不太正确:您将 OAS 及其数据与 dba 组关联,但 OAS(及其数据)的某些依赖项并不在该组中。我有一些建议:
I don't know much about OAS... but I'd presume the files unpacked from the war file would be owned and accessed by the user as which OAS is running. Is that not correct? Can you explain a bit more about what is actually happening or why this is a problem?
Following your additional comments below...
It sounds like your security model is simply not quite right: you associate OAS and its data with the dba group, but some dependencies of OAS (and its data) are not in that group. I have a few suggestions:
根据您对 Steven 的回答的评论,对于部署 war 文件的用户,将
umask
设置为000
怎么样? (这将是 oracleas,umask 变量通常在该用户的 .profile 中设置。)umask(现在可能设置为 027)屏蔽文件权限,000 不会屏蔽任何内容,从而导致其他人的权限。Based on your comment to Steven's answer, how about setting
umask
to000
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.