Bug 678883
Summary: | File mode bits not preserved after deployment | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | John Sanda <jsanda> | ||||||
Component: | Provisioning | Assignee: | Robert Buck <rbuck> | ||||||
Status: | CLOSED CANTFIX | QA Contact: | Mike Foley <mfoley> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | 3.0.0 | CC: | rbuck | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2011-11-01 21:27:26 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 745494 | ||||||||
Attachments: |
|
Description
John Sanda
2011-02-20 15:47:42 UTC
I tried uploading the bundle I have been using for testing, but it exceeded the max size for attachments. I will attach the recipe file I was using and then later try to upload a smaller, simpler example that reproduces the bug. Created attachment 479786 [details]
The recipe I was using when I encountered the bug.
Created attachment 479790 [details]
test bundle that reproduces the issue
This is a fundamental Java limitation; Java itself does not preserve file mode bits, permissions, nothing, for any of the "supported" archive types. The only way to really support this is to natively wrap infozip or some such; that's out of scope for now unless someone else indicates otherwise. I tested Ant, various Java API's, and various Java versions; yes, 1.6 and later have the ability to set executable bits on File objects now, but the ZipEntry and JarEntry classes expose no fields to get at the information; in effect, this is a first class data corruption issue on Sun's part. So the workaround is to use what jsanda suggested: <property name="eap.dir" value="${rhq.deploy.dir}/jboss-eap-5.0"/> <chmod file="${eap.dir}/jboss-as/bin/run.sh" perm="+x"/> <exec dir="${eap.dir}/jboss-as/bin" executable="run.sh" spawn="true" resolveexecutable="true"> <arg line="-b 0.0.0.0"/> </exec> |