PermissionError: [Errno 13] Permission denied

Bug #1380395 reported by ineuw
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
MenuLibre
Invalid
Undecided
Unassigned

Bug Description

I am using Xubuntu 14.04.1 Installed the latest Menulibre update 2.0.6 but the problems multiply. When activating from the settings manager changes cannot be saved. Replacing an icon, or trying to hide or reveal an application, the save button is disabled and cannot be clicked. When trying to move away from the selection, or close the editor, it's prompting me if I want to save it. Replying in the positive, or canceling doesn't work. The only way out is to respond, is to click "do not save".

When accessing it from the terminal as su, With each attempt I get:
No menu prefix found, MenuLibre will not function properly.
WARNING:menulibre: getDefaultMenuPrefix() 'No menu prefix found, MenuLibre will not function properly.'
WARNING:menulibre: getDefaultMenuPrefix() 'No menu prefix found, MenuLibre will not function properly.'

Items cannot be hidden or revealed, the save button is accessible but doesn't do anything. When I delete an item, it responds that it is no longer installed, but the icon is deleted. Each action triggers the above warning in the terminal. Also the menu structure in Menulibre is different than when activated from the Settings manager.

When accessing from the terminal as a regular user to change the icon of the browser, the following message shows up:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/menulibre/MenulibreApplication.py", line 2659, in on_save_launcher_cb
    self.save_launcher()
  File "/usr/lib/python3/dist-packages/menulibre/MenulibreApplication.py", line 2307, in save_launcher
    with open(filename, 'w') as output:
PermissionError: [Errno 13] Permission denied: '/home/ineuw/.local/share/applications/exo-web-browser.desktop'

If you want me to supply any info from any log, please let me know by email. I am on the list of recipients.

Revision history for this message
Sean Davis (bluesabre) wrote :

Since you opened menulibre with "su", your menu files are now all owned by the root user. You'll find the menu files in:

/home/username/.config/menus
/home/username/.local/share/applications
/home/username/.local/share/desktop-directories

Verify the file permissions or remove the files and start over. I'll add additional checks to prevent menulibre running under su/sudo.

Revision history for this message
ineuw (ineuw) wrote : Re: [Bug 1380395] Re: Menulibre 2.0.6 is hopelessly broken

On 14-10-12 07:49 PM, Sean Davis wrote:
> Since you opened menulibre with "su", your menu files are now all owned
> by the root user. You'll find the menu files in:
>
> /home/username/.config/menus
> /home/username/.local/share/applications
> /home/username/.local/share/desktop-directories
>
> Verify the file permissions or remove the files and start over. I'll
> add additional checks to prevent menulibre running under su/sudo.
Thanks for the reply.

I was aware of the above mentioned folders, and your instructions, as I
read other users' posts and bug reports. In my case
only/home/ineuw/.config/menus had a single .xml file, which I deleted,
the other two folders were empty.

I opened Xubuntu as a regular user and Started Menulibre from the
Settings manager. The image #1 shows what happens when I tried to
change the browser's icon to Firefox. After selecting the icon, the Save
button is enabled but clicking on it does nothing. Then when I want to
move away, I get the prompt if I want to save it. Responding "Yes" or
"Cancel" do nothing. I must select "Don't Save" to get out. This
happens whatever change I try to make.

At the same time, Menulibre crashed and I captured the crash report in
two images #2 is the top part of the report, #3 is the bottom part. The
images overlap. I couldn't select and copy the message, the editor
access to the error report was disabled. So, sorry about the screenshots.

This crash occurred earlier as well, when when I posted my bug report,
and suspected that perhaps the Nvidia driver was at fault. So, I
installed another Nvidia driver from the repository but it didn't help.
As I write this, I will again replace the driver and install the X-org's
nouveau driver. I will let you know if it helps.

ineuw

Revision history for this message
Sean Davis (bluesabre) wrote : Re: Menulibre 2.0.6 is hopelessly broken

This error (as seen in screenshot 2):

PermissionError: [Errno 13] Permission denied: '/home/ineuw/.local/share/applications/exo-web-browser.desktop'

indicates that you do not have permissions for this file. Either the file is owned by root, or the folder /home/ineuw/.local/share/applications is.

Revision history for this message
ineuw (ineuw) wrote :

Thanks for the help! It saves my changes,

I took ownership of the folders & subfolders and files related to

/home/username/.config/menus
/home/username/.local/share/applications
/home/username/.local/share/desktop-directories

 The ony thing I can't do is reveal more icons in the system section, your help would be greatlly appreciated.

Revision history for this message
Alex (fallout07) wrote :

What's the reason that these files are owned by root by default? On a clean install of Xubuntu 14.04, even if you do not start menulibre with su, changes will not save.

Revision history for this message
Sean Davis (bluesabre) wrote :

@Alex

These files are not owned by root by default. If, at any point, you open menulibre with any variation of su/sudo/gksudo, you run the risk of changing ownership of these files to the root user (invoked with su). You may be experiencing another issue, in which case you will want to create a new bug if necessary.

Things to note:
1) Version of menulibre (apt-cache policy menulibre)
2) Output when running from terminal

There are a number of issues that were found in earlier versions of menulibre. These have been addressed in 2.0.6, but there may be some menu corruption with earlier versions, or if trying to launch as a root user.

Pasi Lallinaho (knome)
Changed in menulibre:
status: New → Invalid
Pasi Lallinaho (knome)
summary: - Menulibre 2.0.6 is hopelessly broken
+ PermissionError: [Errno 13] Permission denied
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.