Bug 304569

Summary: Desktop files permissions are 755
Product: [Applications] korganizer Reporter: Andrea Scarpino <scarpino>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED NOT A BUG    
Severity: minor CC: adaptee, faure
Priority: NOR    
Version: GIT (master)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Andrea Scarpino 2012-08-04 18:40:19 UTC
The CMakeLists.txt file explicitly installs the desktop file with permissions 755.

    install(PROGRAMS
      korganizer.desktop korganizer-import.desktop
      DESTINATION ${XDG_APPS_INSTALL_DIR}
    )

This also apply to a lot of KDE programs.

Reproducible: Always

Steps to Reproduce:
1. Build and install korganizer
2. Check for the desktop files permissions.
Actual Results:  
Permissions are set to 755

Expected Results:  
Permissions should be 644

KDE 4.9.0
Comment 1 Jekyll Wu 2012-12-09 22:37:44 UTC
I think that is actually convention or even policy in KDE (for security reason?), but unfortunately I can't find any (in)formal reference...
Comment 2 Andrea Scarpino 2012-12-10 08:36:30 UTC
644 is secure, 755 is not.
Comment 3 David Faure 2012-12-10 10:39:09 UTC
KDE requires 755 for executing .desktop files, just like unix requires 755 to execute scripts and programs.
So this is actually a security measure.

See the full discussion here:
http://lists.kde.org/?l=kde-core-devel&m=123438701825150&w=4

Of course for compat reasons, KDE can also run non-executable desktop files if they come from the install prefix, but installs them as executable from now on, so that this can be fully required at some point, and so that other environments or setups will execute them.