Chrome locking up with .pki/nssdb directory error

After re-installing Ubuntu 12.04 back on my laptop I noticed that Google Chrome was quite unstable. I was using version 28.0.3, but every time I opened it up it asked if I wanted to set it as my default browser.

Every time I clicked yes.

Every time it failed to remember it when I came to open it up again.

On top of that, Chrome would completely lock up Ubuntu. The whole system stopped responding. The OS wouldn’t even react to system shortcuts, such as opening a new Terminal window with Ctrl+Alt+T. After a hard reboot, I started up Chrome from the Terminal and noticed the following errors.

paul@crypt:~$ google-chrome 
[0812/] Failed to create /home/paul/.pki/nssdb directory.
[0812/] Failed to create /home/paul/.pki/nssdb directory.
[16121:16151:0812/] Failed to create /home/paul/.pki/nssdb directory.

Anything in your home directory should really belong to you, so saying that its failing to create something points quite significantly to a permissions problem. Running the following from my home directory shows the problem.

paul@crypt:~$ ls -la ~/ | grep pki
drwx------ 3 root root 4096 Aug 12 21:09 .pki

The .pki directory is owned by root! No wonder Chrome can’t get permission for those directories.

Fixing Google Chrome’s pki/nssdb Error

So to fix this little problem, run the command below. What it will do is change the user and group ownership of the hidden pki directory to yours. Not only that, but it’ll recursively change its contents too.

(Obviously you need to substitute in your own username instead of mine)

paul@crypt:~$ sudo chown -R paul:paul ~/.pki/

After that, give Chrome a load and everything should run smoothly. No idea why the permissions got screwed up to begin with, I guess I installed it locally as root, but hopefully this article helps you.

Leave a Reply

Your email address will not be published. Required fields are marked *