I have an executable file (ffmpeg) that I'm trying to run with a Java program on a Mac. I used the Java program to send the command chmod 777 /path/to/ffmpeg
, but when I try to run ffmpeg, I get the following error:
java.io.IOException: Cannot run program "/Users/james/WalkTheHall/ffmpeg": error=13, Permission denied
But when I run chmod 777 /path/to/ffmpeg
from Terminal on my own before opening the Java application, the command to ffmpeg will run just fine in the Java program.
Is there a difference between calling chmod
from within the Java program and calling it on my own? Why will it not work? Thank you!