Firefox 19 fails to launch unless sudo
Hi, Before a recent update, firefox was running fine on my fedora 18. After the update (via yum), firefox will no longer launch unless it is launched as sudo. Initially I thought there was something corrupted in my profile directory ~/.mozilla/firefox/profile.ini and so deleted my ~/.mozilla directory so that it can create a new one. Unfortunately that doesn't do it.
I still get the error: Access was denied while trying to open files in your profile directory.
I see that when I started the firefox, it recreated a new ~/.mozilla/firefox directory but didn't create profile.ini. I looked at the permissions and see nothing wrong with it:
[jade@localhost ~]$ firefox Error: Access was denied while trying to open files in your profile directory.
[jade@localhost ~]$ ls -ld .mozilla/
drwxrwxr-x 4 jade jade 4096 Feb 28 18:43 .mozilla/
[jade@localhost ~]$ ls -l .mozilla/
total 8
drwxrwxr-x 3 jade jade 4096 Feb 28 18:43 extensions
drwx------ 3 jade jade 4096 Feb 28 18:43 firefox
I don't see anything wrong with permissions. I see that I own the directory .mozilla and subdirectories) but I'll go ahead and executed the chown recommended from other sites:
[jade@localhost ~]$ sudo chown -R jade:jade ~/.mozilla/
[sudo] password for jade:
[jade@localhost ~]$ sudo chown -R jade:jade ~/.mozilla/firefox
[jade@localhost ~]$ sudo chown -R jade:jade ~/.mozilla/firefox/*
[jade@localhost ~]$ firefox Error: Access was denied while trying to open files in your profile directory.
But still the error persists. Again, I'm listing the permissions of the .mozilla and its subdirectories:
[jade@localhost ~]$ ls -ld .mozilla/
drwxrwxr-x 4 jade jade 4096 Feb 28 18:43 .mozilla/
[jade@localhost ~]$ ls -la .mozilla/
total 16
drwxrwxr-x 4 jade jade 4096 Feb 28 18:43 .
drwxrw-r-- 46 jade jade 4096 Feb 28 19:06 ..
drwxrwxr-x 3 jade jade 4096 Feb 28 18:43 extensions
drwx------ 3 jade jade 4096 Feb 28 18:43 firefox
[jade@localhost ~]$ ls -la .mozilla/firefox/
total 12
drwx------ 3 jade jade 4096 Feb 28 18:43 .
drwxrwxr-x 4 jade jade 4096 Feb 28 18:43 ..
drwx------ 2 jade jade 4096 Feb 28 18:43 Crash Reports
[jade@localhost ~]$ ls -la .mozilla/firefox/Crash\ Reports/
total 12
drwx------ 2 jade jade 4096 Feb 28 18:43 .
drwx------ 3 jade jade 4096 Feb 28 18:43 ..
-rw------- 1 jade jade 10 Feb 28 18:43 InstallTime20130219173943
[jade@localhost ~]$ ls -la .mozilla/extensions/
total 12
drwxrwxr-x 3 jade jade 4096 Feb 28 18:43 .
drwxrwxr-x 4 jade jade 4096 Feb 28 18:43 ..
drwxrwxr-x 2 jade jade 4096 Feb 28 18:43 {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
[jade@localhost ~]$ ls -la .mozilla/extensions/\{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}/
total 8
Could someone help me? I really don't want to have to run firefox as sudo, but right now that's the only way I can run it. Can't run it as a regular user (jade in this case).
I also remove and re-installed firefox (via yum) and the same problem occurs.
Modified
All Replies (11)
I'm not a Linux expert but it seems odd that you are able to run as root when clearly not even root/sudo has access to all of the files in the folder. There must be some sort of problem with at least one of the files in all of the folders that is causing this, but I have no idea what that might be.
One thing you might want to try instead is to simple move the entire .mozilla folder (while Firefox is not running), and then start Firefox. This will force Firefox to create a completely new profile. You could then shut down Firefox again and then manually copy in files from the old profile folder to the new one -- only the stuff that you care about, such as your bookmarks, cookies, passwords etc. This article lists which files you'll want to restore/copy over: Recovering important data from an old profile
Hope this helps!
- David
Also, as a diagnostic measure, have you tried giving your profile directory & its children ugo+rw permissions? Maybe it's Firefox trying to drop permissions to nobody?
Try to delete the ~/.mozilla/firefox directory.
Hi David, when you run firefox as sudo or root, it will create a ~root/.mozilla directory. It's not accessing my ~jade/.mozilla when one runs firefox as root (or via sudo). I've verified this by looking at ~root's directory and viewing the contents of ~root/.mozilla. It creates the profile.ini fine in the ~root/.mozilla /firefox directory.
It's just, when I run firefox as a regular user (jade), it's not working. As I noted that I had deleted my ~/.mozilla directory and all its contents thinking that the firefox files were corrupted. I deleted it so that it would generate a new profile. And when I attempt to run firefox, it re-created ~/.mozilla/firefox but won't create the profile.ini with the errors I noted above. I've shown the privs of those newly created directories and there's absolutely no reason why firefox has no access to those directories. I even verified that when I launched firefox that I was the owner (jade) of that pid.
Also, as a diagnostic measure, have you tried giving your profile directory & its children ugo+rw permissions? Maybe it's Firefox trying to drop permissions to nobody?
Yeah, I tried that as well and it made no difference. I even went as far as to give permissions to write/read to everyone of my home directory and still made no difference.
Try to delete the ~/.mozilla/firefox directory.
Hi Cor-el, as I noted in my first post, I deleted my ~/.mozilla and all its subdirectories, thinking something was corrupted in my ~/.mozilla. And after launching firefox, the same exact errors occurred. It'll recreate the ~/.mozilla and its subdirectories but won't recreate ~/.mozilla/firefox/profile.ini with the errors noted in my first post. As I've shown, the permissions is not the problem (despite its complaints).
OK, I think I've solved the problem. What I had suspected is that there was something that was corrupted in my login account. So I created myself a new account and sure enough, firefox works again when logged in under this new account.
Though I have no idea what corrupted the old account (nor what part of the account was corrupted because every thing else seemed to run fine except for firefox), at least now in the new account, I can launch firefox as a user!
Had the same problem today on Ubuntu 10.04 with Firefox nightly build. I tried all of these things too (short of creating a new user). Eventually a ls -alR | grep root showed that permissions on some files in ~ were not being changed. This led me to find the ~/.cache folder which contained a mozilla/firefox folder. chown -R me:me mozilla resolved the issue.
I was having this exact problem. Besides firefox only running if I launch it as root, it would also run just fine in other user accounts.
In addition to this, though, I was experiencing *lots* of crashiness with my gtk apps - the file->open or file->save dialog would often crash, for example, on random apps like chrome, emacs, etc.
Here's what fixed it for me:
sudo update-mime-database /usr/share/mime && rm ~/.local/share/mime/mime.cache
I had a similar issue. The problem was the permissions on /root/.cache The current user has to be able to write to that folder in newer versions, as the cache is no longer keep in the same directory as the rest of the profile. So set it to chmod 777.
As did others, I had this issue and traced it down to root ownership of the user's .cache directory.
What I can add to the information here is that, according to posts in the Mageia development ML, this can occur if you use "su" from the userid rather than "su -l". Since I saw the problem on a newly-installed system, I'm guessing that I used su and ran something that needed .cache and was the first to create it, using the user's home directory rather than root's.