Unable to save bookmarks.xml

Bug #198429 reported by bakytn
14
Affects Status Importance Assigned to Milestone
dolphin (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

In Kubuntu 7.10

Just open as with dolphin(default file manager) any folder (try your home folder) as ROOT
and close.

Try to open and close the same folder as normal user.

Before window closes there will be the following alert message

"

Unable to save bookmarks in /home/<username>/.kde/share/apps/d3lphin/bookmarks.xml. Reported error was: Permission denied. This error message will only be shown once. The cause of the error needs to be fixed as quickly as possible, which is most likely a full hard drive.

"

The solution is simple change owner of the /home/<username>/.kde/share/apps/d3lphin/bookmarks.xml to your username

Revision history for this message
bakytn (bakytn) wrote :

Sorry

"

Just open with dolphin(default file manager) any folder (try your home folder) as ROOT
and close.

............"

Revision history for this message
Data (ubuntuaddress) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage . I have classified this bug as a bug in dolphin.

Revision history for this message
bakytn (bakytn) wrote :

Ok thank you!

Changed in dolphin:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Epson (epson-deactivatedaccount) wrote :

I'm still getting this error. I have tried about three or four things.
I even logged in as root and changed the permissions for the file to my username and my name as the group.
When logging out as root and back in as me, the error still happens even though I have user and group ownership.
I just checked again and root has user and group ownership again.

Revision history for this message
ubic (vlad-mihai-mihnea) wrote :

This is a systematic error when using dolphin. Changing back the owner/group only works till the next time a folder is opened as ROOT. I guess that dolphin writes to and saves bookmarks.xml on every exit event, so the closing the folder opened as root will change the owner/group every time.

Revision history for this message
Epson (epson-deactivatedaccount) wrote :

I'm still getting this error with kubuntu 8.04. I've modified the folder permissions and the error still happens later on.
Will there be a patch for this?

Revision history for this message
Dori (tsurd2) wrote :

I had it, here is more explanation

Flow:

1. run "sudo d3lphin"
2. close it
3. run d3lphin
4. close it
5. you get /home/<username>/.kde/share/apps/d3lphin/bookmarks.xml error.

Cause:

Every time you close d3lphin a new /home/<username>/.kde/share/apps/d3lphin/bookmarks.xml is written.
When you run as root, the d3lphin creates /home/<username>/.kde/share/apps/d3lphin/bookmarks.xml with root permissions.
Later, when you run as user, you try to overwrite /home/<username>/.kde/share/apps/d3lphin/bookmarks.xml and fails.

My solution: sudo chmod 777 to /home/<username>/.kde/share/apps/d3lphin/bookmarks.xml (and poossibly /home/<username>/.kde/share/apps/d3lphin/bookmarks.xml.bak if there is a problem there).

After 2 closes of d3lphin as user the root permission files are overwritten and problem solved.

d3lphin developers: consider adding a "sudo /home/<username>/.kde/share/apps/d3lphin/bookmarks.xml" option when user get this error to overcome this issue in an automatic manner.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

GUI apps should never be run with sudo, for it will cause permissions problems such as this.
To run GUI applications with admin privileges, use kdesudo. (e.g. kdesudo dolphin) kdesudo is designed to prevent this sort of permissions problem from occurring.

Changed in dolphin:
status: Confirmed → Invalid
Revision history for this message
Allen Bethea (allen-bethea) wrote :

Had same problems. Dori's solution worked like a charm!

Revision history for this message
Basic (basicxp) wrote :

Thanks for help! Kdesudo also made me live OK.

Revision history for this message
bakytn (bakytn) wrote :

yes. thank you. We should use kdesu

Revision history for this message
Martin Sondergaard (linux-sondergaard) wrote :

The workaround described by Dori works. But it would still be good if the d3lphin developers can fix this bug. So I changed this from "invalid" to "confirmed". I think fixing this bug is a simple matter of creating the "bookmarks.xml" file with different permissions.

Changed in dolphin:
status: Invalid → Confirmed
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

The permissions get messed up if you run the application with sudo. There isn't anything that can be done about that.

Changed in dolphin:
status: Confirmed → Invalid
Revision history for this message
Martin Sondergaard (linux-sondergaard) wrote :

Jonathan, why did you say "There isn't anything that can be done about that"? Surely all that needs to be done is that "bookmarks.xml" needs to be given permissions so that everyone can read and write to it. That can be done.

Changed in dolphin:
status: Invalid → Confirmed
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Launching dolphin with sudo will overwrite these permissions.

Changed in dolphin:
status: Confirmed → Invalid
Revision history for this message
Martin Sondergaard (linux-sondergaard) wrote :

Are you thinking that the permissions of the file "bookmarks.xml" change when Dolphin starts up, regardless of whether Dolphin writes to this file?

Or are you thinking that if Dolphin is run with sudo, then its impossible for Dolphin to create a file which has permissions set so that everyone can write to it?

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

No, but we can't go around putting workarounds to every file write of any application that can be run with sudo. It's not Dolphin's job to protect users from opening it with sudo rather than kdesudo any more than it's a terminal emulator's job to not let people "rm -rf /" even though they shouldn't.

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.