United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6957030 desktop shortcut is created without executable bit in Ubuntu 10.4
JDK-6957030 : desktop shortcut is created without executable bit in Ubuntu 10.4

Details
Type:
Bug
Submit Date:
2010-05-28
Status:
Closed
Updated Date:
2013-11-12
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
deploy
OS:
linux_ubuntu
Sub-Component:
webstart
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:

Related Reports
Duplicate:

Sub Tasks

Description
FULL PRODUCT VERSION :
Linux port-vendedor-1 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux

ADDITIONAL OS VERSION INFORMATION :
Ubuntu 10.4 Desktop Edition
Linux port-vendedor-1 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux

EXTRA RELEVANT SYSTEM CONFIGURATION :
Ubuntu, Gnome 2.30

A DESCRIPTION OF THE PROBLEM :
When a Java Web Start application is launched and a desktop shortcut is created, the shortcut doesn't show the correct icon and it doesn't work. When it is executed it fails with an error saying that it is unsafe to execute that file. The only option in the error message is "Cancel". The only way to execute the shortcut is to manually open the file's permissions properties page and turn on the executable bit (or do so through the terminal). After that, the correct icon appears and the link works as expected.

I don't know how many Gnome-based systems are affected by this problem, I only had this one to test.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install Ubuntu 10.4 Desktop Edition
Configure any internet connection
Install sun-java6-jre
Launch a Java Web Start application that creates a desktop shortcut
(I recomend the BasicServiceDemo at http://pscode.org/jws/api.html#bs)

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
A fully functional desktop shortcut with the correct icon
ACTUAL -
A non-functional desktop shortcut without the correct icon

ERROR MESSAGES/STACK TRACES THAT OCCUR :
I'm really sorry but the system where I detected this issue is in Portuguese language and I was unable to test this in an English language system before this report so the erros messages I've written are translations that may not return the relevant results in search engines.

Error when attempting to execute the shortcut: "The shortcut "[name_of_file]" has not been marked as trusted. If you don't know the origin of this file, executing it may be unsafe."

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
The only workarounds I can think of need to be done in the client system. Either go to the shortcut properties, then to the permissions tab and turn on the permission to execute the file, or execute the command "chmod a+x" in the terminal.

                                    

Comments
EVALUATION

the files are created in GnomeVfsWrapper.c, but using the permissions DEF_FIL_PERM:
#define DEF_FIL_PERM S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
so this can likely be fixed by changing this to:
#define DEF_FIL_PERM S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IROTH 
(ie: change from 644 to 744)
                                     
2011-01-27



Hardware and Software, Engineered to Work Together