Execute disable bit on an mp3 player?

Chris Irwin chris at chrisirwin.ca
Mon Feb 14 20:32:34 UTC 2011


On Sat, Feb 12, 2011 at 11:47, Bob Jonkman <bjonkman at sobac.com> wrote:
> Would the .jar files need to have the execute bit set?  I would think that
> as far as the operating system is concerned, they're just data files for the
> Java interpreter/compiler.  It's the Java executable program that needs the
> X bit, and it is probably stored on your computer's drive, not the USB
> drive.

Jar files don't need the exec bit, except for when they do. You're
executing `java`, not the .jar. If you're running it from the command
line as `java -jar /my/file.jar`, you should be fine.

However, Ubuntu has a wrapper called 'cautious-launcher' that is used
to wrap around java and some other executables, and is used in
.desktop files distributed by Ubuntu. The purpose of that script is to
check if the input file (jar, .sh, whatever) actually has the exec bit
set itself, then calls the required interpreter (java, bash,
whatever). I believe cautious-launcher is also used when performing
mime handling (double-clicking a jar file in nautilus, etc).

https://wiki.ubuntu.com/SecurityTeam/Policies#Execute-Permission Bit Required

The downside of this is that execute behaviour is different via GUI
and CLI, since you probably won't be calling 'cautious-launcher'
manually.

-- 
Chris Irwin
<chris at chrisirwin.ca>




More information about the ubuntu-ca mailing list