Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Execute permission check fails on executable file Edited

I've built custom docker image based on `ubuntu:21.04` for qt based android app development but encountered with weird bug when running `androiddeployqt` inside a pipelines.

java executable fails to test against execution permissions.

Here is log of pipeline execution:

Images used:
build :
+ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre

+ ls -la /usr/bin/java
lrwxrwxrwx. 1 root root 22 Jun 16 13:14 /usr/bin/java -> /etc/alternatives/java

+ ls -la /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
-rwxr-xr-x. 1 root root 14632 Apr 21 10:25 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

+ if [ ! -x "$JAVA_HOME/bin/java" ] ; then echo "not an exec $JAVA_HOME/bin/java" ; fi
not an exec /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

+ /opt/Qt/5.15.2/android/bin/androiddeployqt --input android_deployment_settings.json --output android-build --apk $BITBUCKET_CLONE_DIR/build/debug.apk --android-platform android-29 --gradle

ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-8-openjdk-amd64/jre

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.


Problem is that  `/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java` is executable (I'm able to run it inside pipeline) however test for executable `-x` fails. I suppose it somehow related to selinux


When I run pipeline commands inside docker locally everything works fine

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

Share your use cases: How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features to how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your tea...

44 views 0 1
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you