[Bug 284519] New: kmenuedit silently fails to modify the menu when ~/.local directory file permissions are wrong

peter.maloney at brockmann-consult.de peter.maloney at brockmann-consult.de
Thu Oct 20 08:43:13 BST 2011


https://bugs.kde.org/show_bug.cgi?id=284519

           Summary: kmenuedit silently fails to modify the menu when
                    ~/.local directory file permissions are wrong
           Product: kmenuedit
           Version: unspecified
          Platform: Unlisted Binaries
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: unassigned-bugs at kde.org
        ReportedBy: peter.maloney at brockmann-consult.de


Version:           unspecified
OS:                Linux

$ kmenuedit --version
Qt: 4.7.2
KDE Development Platform: 4.6.5 (4.6.5)
KDE Menu Editor: 0.8

When using kmenuedit to add a submenu or item, then clicking "save", it looks
like it worked, and everything saved (no error message). However, my file
permissions were wrong (for unknown reasons), so it did not save properly. I am
reporting this, because there should be feedback, saying that the changes
failed.

If I run kmenuedit from command line with the broken file permissions, and
create a submenu, and an item in it, here is the output:
===============================
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such
file or directory
QFileSystemWatcher: failed to add paths: /home/peter/.config/ibus/bus
kmenuedit(10553)/kdecore (services) KServicePrivate::init: The desktop entry
file  "/home/peter/.local/share/applications/a.desktop"  has Type=
"Application"  but no Exec line 

QFile::remove: Empty or null file name
QFile::remove: Empty or null file name
===============================

If I do the same after changing permissions (so things work), here is the
output:
===============================
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such
file or directory
QFileSystemWatcher: failed to add paths: /home/peter/.config/ibus/bus
kmenuedit(11533)/kdecore (services) KServicePrivate::init: The desktop entry
file  "/home/peter/.local/share/applications/test2.desktop"  has Type=
"Application"  but no Exec line 
===============================

Here is what I did to fix it:

sudo chown peter:peter -R ~/.local

I don't know why the permissions were wrong (we can blame Ubuntu/kubuntu), but
the owner of some directories was root:root. (In particular, the one I noticed
first was ~/.local/share/applications)

Reproducible: Always

Steps to Reproduce:
sudo chown root:root -R ~/.local
kmenuedit
(add a submenu and an item)
(hit save)
(close)
kmenuedit


Actual Results:  
You sometimes have your submenu, but not the item. 
Sometimes you have a submenu with the wrong name, such as ~2 added on the end
and no item.
Sometimes you have nothing that you added.

Expected Results:  
If permissions are wrong, the result should be error messages on screen in the
gui, that clearly state that something important has failed having to do with
having write access to files or directories. 

Example:
   Failed to write changes to disk. Error was: /home/peter/.local/... :
Permission denied

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Unassigned-bugs mailing list