[
https://issues.jboss.org/browse/JBIDE-13217?page=com.atlassian.jira.plugi...
]
Andre Dietisheim commented on JBIDE-13217:
------------------------------------------
Digging into this is saw that the problem is in our FileUtils#copy method which simply
creates directories and writes to destination files without caring about file
permissions.
Aside this there's a limitation in JDK6: It can set permissions for owners and groups
but can't read those 2 rights distinctively.
You can see this in EGit's patch that tried to solve
https://bugs.eclipse.org/bugs/show_bug.cgi?id=366366 but was abandoned:
{code:title=https://git.eclipse.org/r/#/c/7296/1/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX_Java6.java}
r = setExecute.invoke(f, new Object[] { Boolean.valueOf(canExec), Boolean.FALSE });
{code}
The above snippet reads executable rights with File@canExecute and sets them to the owner
rights (1st param), the group rights are simply set to false (2nd param)
In this issue we're fine when setting executable rights for the owner, since the hooks
have x-permissions for the owner only. So we will fix FileUtils#copy to replicate the
owner permissions.
Execute permissions modified in new openshift projects causing action
hoooks to not execute
-------------------------------------------------------------------------------------------
Key: JBIDE-13217
URL:
https://issues.jboss.org/browse/JBIDE-13217
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 4.0.0.CR1
Environment: Linux, Mac (NOT Windows)
Reporter: Max Rydahl Andersen
Assignee: Andre Dietisheim
Labels: respin-c
Attachments: hook-premissions-windows.jpg
1. EXEC: Create and import new app
2. ASSERT: execute permissions on action_hooks get resetted.
{code}
diff --git a/.openshift/action_hooks/build b/.openshift/action_hooks/build
old mode 100755
new mode 100644
diff --git a/.openshift/action_hooks/deploy b/.openshift/action_hooks/deploy
old mode 100755
new mode 100644
diff --git a/.openshift/action_hooks/post_deploy b/.openshift/action_hooks/post_deploy
old mode 100755
new mode 100644
diff --git a/.openshift/action_hooks/post_start_jbosseap-6.0
b/.openshift/action_hooks/post_start_jbosseap-6.0
old mode 100755
new mode 100644
diff --git a/.openshift/action_hooks/post_stop_jbosseap-6.0
b/.openshift/action_hooks/post_stop_jbosseap-6.0
old mode 100755
new mode 100644
diff --git a/.openshift/action_hooks/pre_build b/.openshift/action_hooks/pre_build
old mode 100755
new mode 100644
diff --git a/.openshift/action_hooks/pre_build_jbosseap-6.0
b/.openshift/action_hooks/pre_build_jbosseap-6.0
old mode 100755
new mode 100644
diff --git a/.openshift/action_hooks/pre_start_jbosseap-6.0
b/.openshift/action_hooks/pre_start_jbosseap-6.0
old mode 100755
new mode 100644
diff --git a/.openshift/action_hooks/pre_stop_jbosseap-6.0
b/.openshift/action_hooks/pre_stop_jbosseap-6.0
old mode 100755
new mode 100644
diff --git a/.openshift/cron/weekly/chronograph b/.openshift/cron/weekly/chronograph
{code}
3. EXEC: publish the application to OpenShift
Result:
{code}
/usr/libexec/openshift/cartridges/abstract/info/lib/util: line 992:
/var/lib/openshift/1e6a743963104f30bdcdebdff460d42b/app-root/runtime/repo/.openshift/action_hooks/post_start_jbossas-7:
Permission denied
Failed to start jbossas-7
{code}
...but the server is started.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira