Skip to content

Snap cannot run "java" error=13, Permission denied #1074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
berkes opened this issue May 5, 2025 · 2 comments
Open

Snap cannot run "java" error=13, Permission denied #1074

berkes opened this issue May 5, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@berkes
Copy link

berkes commented May 5, 2025

Most appropriate sub-area of Processing 4?

Build process

Processing version

4.4.3

Operating system

Ubuntu 24.04.2

Steps to reproduce this

  1. Install beta with snap

  2. Start the GUI with any processing sketch that will compile.

  3. Attempt to "run" the sketch using either the shortcut or the Run button.

Caused by: java.io.IOException: Cannot run program "/snap/processing/8/opt/processing/lib/app/resources/jdk/bin/java": error=13, Permission denied

Exception in thread "Thread-13" java.lang.RuntimeException: Exception while attempting /snap/processing/8/opt/processing/lib/app/resources/jdk/bin/java -agentlib:jdwp=transport=dt_socket,address=8209,server=y,suspend=y,quiet=y -Djna.nosys=true -Djava.library.path=:/snap/processing/8/opt/processing/lib/app/resources/core/library:/snap/processing/8/opt/processing/lib/runtime/lib:/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void:/snap/processing/8/usr/lib:/snap/processing/8/usr/lib/x86_64-linux-gnu:/snap/processing/8/opt/processing/lib/app:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib -cp /tmp/processing/complex_waterlily6286993720571114719temp:/snap/processing/8/opt/processing/lib/app/resources/core/library/annotations-13.0.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/antlr-2.7.7.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/core-4.4.3.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/gluegen-rt-2.5.0-natives-android-aarch64.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/gluegen-rt-2.5.0-natives-linux-aarch64.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/gluegen-rt-2.5.0-natives-linux-amd64.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/gluegen-rt-2.5.0-natives-linux-armv6hf.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/gluegen-rt-2.5.0-natives-macosx-universal.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/gluegen-rt-2.5.0-natives-windows-amd64.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/gluegen-rt-2.5.0.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/gluegen-rt-main-2.5.0.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/jogl-all-2.5.0-natives-android-aarch64.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/jogl-all-2.5.0-natives-linux-aarch64.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/jogl-all-2.5.0-natives-linux-amd64.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/jogl-all-2.5.0-natives-linux-armv6hf.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/jogl-all-2.5.0-natives-macosx-universal.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/jogl-all-2.5.0-natives-windows-amd64.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/jogl-all-2.5.0.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/jogl-all-main-2.5.0.jar:/snap/processing/8/opt/processing/lib/app/resources/core/library/kotlin-stdlib-2.0.20.jar -ea processing.core.PApplet --external --display=2 --sketch-path=/home/ber/Documents/ART_art/art/processing/complex_waterlily complex_waterlily
	at processing.core.PApplet.exec(PApplet.java:3197)
	at processing.mode.java.runner.Runner.lambda$launchJava$0(Runner.java:527)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Cannot run program "/snap/processing/8/opt/processing/lib/app/resources/jdk/bin/java": error=13, Permission denied
	at java.base/java.lang.ProcessBuilder.start(Unknown Source)
	at java.base/java.lang.ProcessBuilder.start(Unknown Source)
	at java.base/java.lang.Runtime.exec(Unknown Source)
	at java.base/java.lang.Runtime.exec(Unknown Source)
	at processing.core.PApplet.exec(PApplet.java:3195)
	... 2 more
Caused by: java.io.IOException: error=13, Permission denied
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
	at java.base/java.lang.ProcessImpl.start(Unknown Source)
	... 7 more

The binary at /snap/processing/8/opt/processing/lib/app/resources/jdk/bin/java indeed has no executable bit:

ls -ahl /snap/processing/8/opt/processing/lib/app/resources/jdk/bin/java 
Permissions Size User Date Modified Name
.rw-r--r--   16k root 25 apr 15:10  /snap/processing/8/opt/processing/lib/app/resources/jdk/bin/java

This is the same error seen in #1047 where this same missing executable permission surfaced when running processing in CLI mode.

snippet

// Paste your code below :)

void setup() {

}

void draw() {

}

Additional context

No response

Would you like to work on the issue?

no

@berkes berkes added the bug Something isn't working label May 5, 2025
@Stefterv
Copy link
Collaborator

Stefterv commented May 5, 2025

Hi @berkes Thanks for the extensive reporting! I do not have my linux machine with me today so I will look into this a bit later but seems like a simple fix with the permissions indeed.

@SWalterWright
Copy link

I have the same problem on my RPi 500 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants