FireFox won't launch, "Error: Access was denied while trying to open files in your profile directory"
Solution 1
This seems to a known, system-dependent bug. Have a look at the link added at end (your precise error message). Following another link on that page, only suggestions I saw were to disable AppArmor if you run it; or roll FF back: Bug Report.
If nothing works, maybe give Chrome a try.
Solution 2
Found the below link that is related.
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1180227
I did the following:
ls .cache/mozilla/
ls: cannot open directory .cache/mozilla/: Permission denied
chown -R user.user .cache/mozilla/
chown: cannot read directory ‘.cache/mozilla/’: Permission denied
sudo chown -R user.user .cache/mozilla/
firefox
This fix my problem.
Solution 3
You have to remove/gain access on 2 folders:
~/.mozilla/firefox
~/.cache/mozilla
The .cache folder you can just delete :)
Related videos on Youtube
Jeff McMahan
I'm a freelance mobile/web developer. And I love both ubuntu server and desktop.
Updated on September 18, 2022Comments
-
Jeff McMahan almost 2 years
I cannot launch FireFox, as I'm getting the "Your Firefox profile cannot be loaded. It may be missing or inaccessible." error when I attempt to launch the latest FireFox in Ubuntu 13.04 (up to date). Bash produces the following:
(process:5052): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed Error: Access was denied while trying to open files in your profile directory. Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
I do not think this is a duplicate question, as I have tried the 3 solutions that are posted in one place or another. Here they are:
(1) Remove and reinstall FF. Attempting to launch produces the same error.
(2) Rename /home/[myname]/.mozilla from bash, then create a new folder to replace it, so as to make sure that the correct user owns the directory. Attempting to launch produces the same error, both in Unity and in terminal.
(3) chown the directory from bash, with
sudo chown myname /home/myname/.mozilla
or with
sudo chown myname:myname /home/myname/.mozilla
The command executes without problems, but launching FF produces exactly the same error as before. When I check the owner of the folder, it shows the correct user (me). Recursively setting ALL permissions to 777 (so there can't be a problem with the permissions still gives the same thing.
I can run 'sudo firefox' from bash. But bash throws a warning that the profile folder has the wrong owner (i.e., it's not owned by root).
So, any ideas?
UPDATE:
Complete purge removal via
sudo apt-get purge firefox firefox-globalmenu firefox-gnome-support
and reinstall with
sudo apt-get install firefox firefox-globalmenu firefox-gnome-support
Also does not work. Exactly the same behavior as before.
-
Jeff McMahan over 10 yearsI'm primarily a Chrome user, but as a web developer I need to have FireFox working too, if only for testing.
-
gnometorule over 10 yearsThat sucks, as it really sounds it is bug based on the combination of your system with current FF. I would try to get a tarball of a slightly older version of FF then, and see if that version works. Not ideal, but better than nothing. Gl!
-
Jeflopo over 9 yearsIt works. But the absolute path is ~/.cache/mozilla/ The paths in the answer will only work if you are under ~/ oath (your home)
-
Mohammed Sufian over 8 yearsthat's just worked perfect.. but i had also done
sudo chown -R usernamehere.usernamehere .mozilla/
now i can use firefox :) -
LantzR over 8 yearsThis worked perfectly. The originals as installed were owned by root.
-
Shafiq Jetha about 5 yearsI had run chrome with sudo, and with --no-sandbox, so I'm guessing that this is why Firefox then couldn't access the .cache directory properly. This answer got me going again, though.