vanwang / xuggle

Automatically exported from code.google.com/p/xuggle
0 stars 0 forks source link

Can't execute Xuggle programs using different users #306

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a Xuggle-based program on a *nix machine
2. check that /tmp/xuggle directory is created. At the end of the execution of 
the program it should e empty (because of 
https://github.com/xuggle/xuggle-xuggler/blob/master/src/com/xuggle/ferry/JNILib
rary.java - private static void deleteTemporaryFiles())
3. execute the program with a different user (not root!). 

What is the expected output? What do you see instead?

Expected output is that the program works again. The outcome is "ERROR ~ could 
not create temp file: {}
java.io.IOException: Permission denied". See 
http://stackoverflow.com/questions/10449799/java-io-ioexception-permission-denie
d-with-xuggle#comment18861705_10466550

What operating system and JVM version are you using.

Ubuntu 11.04 with OpenJDK 1.6 and Sun JDK 1.6

Attach relevant log/output files.

Solution to the problem: give writing rights to /tmp/xuggle to group+other 
users (see answers in 
http://stackoverflow.com/questions/10449799/java-io-ioexception-permission-denie
d-with-xuggle#comment18861705_10466550).

TH e problem seems to be related to: 
private static File getTmpDir() { 
File tmpdir = new File(System.getProperty("java.io.tmpdir")); 
File xuggledir = new File(tmpdir, "xuggle"); 
xuggledir.mkdirs(); 
return xuggledir.exists() ? xuggledir : tmpdir; 
} 
in src/com/xuggle/ferry/JNILibrary.java that's used in private boolean 
unpackLibrary(String path) (same class). The name of the temp directory should 
randomized.

Original issue reported on code.google.com by marco.be...@gmail.com on 5 Dec 2012 at 9:10