Bug 304569 - Desktop files permissions are 755
Summary: Desktop files permissions are 755
Status: RESOLVED NOT A BUG
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: GIT (master)
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-04 18:40 UTC by Andrea Scarpino
Modified: 2012-12-10 10:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.