1

After using Firefox and Thunderbird without problems for almost half a year on Ubuntu 15.04, they suddenly did not start any more, neither from starter, nor from terminal. Trying to start from terminal gives me the error Could not create gnome accelerators directory '/home/<username>/.gnome2/accels': Permission denied. I was still able to start both programs using sudo. After seeing that the entire ./.gnome2 was under root ownership I changed the ownership of /home/<username>/.gnome2/accels to my user. Now I am able to start Firefox again, but for Thunderbird I still get the same error. So I changed ownership of the entire ./.gnome2 folder recursively, which enabled me to open both programs normally again, but some the programs do not access the right profiles now, as all my mail addresses are gone in Thunderbird as well as all Add-on setting in Firefox. Now I would like to know:

  1. What led to this problem?
  2. What would be the right way to resolve it?
1

You have run firefox and thunderbird as root, or via sudo. This is a Bad Idea, for many reasons. One is that any files (including configuration files) saved will be owned by root. Another reason is that running them as root makes them Very Powerful Foot-Shooting tools.

To repair, change the ownership of the directories and their contents with (read man sudo;man chown; man id first):

sudo chown -R $(id-u):$(id -g) ${HOME}/.gnome2 

To find the other files and directories in $HOME that are owned by root, you could do:

sudo find ${HOME} -user root -ls  

To find files that $USER is not allowed to access:

sudo find $HOME \! -readable -ls
  • So now I have changed the ownership of all files and directories in $HOME using sudo chown $(id -u):$(id -g) $(sudo find ${HOME} -user root). Both Firefox and TB start now from starter/terminal again, but still they do not access the the right profiles. – Jarno Sep 20 '15 at 16:53
  • Which are "the right profiles"? man firefox shows me -ProfileManager and -P profile command line switches for FIrefox, and man thunderbird shows -P profile. – waltinator Sep 20 '15 at 21:28
  • Also, by fixing the problem your way, you now cannot answer the question, "what other root owned files did I have?". That would have bothered me. – waltinator Sep 20 '15 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.