I'm working on Ubuntu 18.04.01 using Guake terminal and zsh.

Every time I run a command in terminal I get this warning after executing this command.

Could not open directory '.dbus/': Permission denied

I noticed having this warning after installing zsh.

  • What does it mean?
  • How can I solve this warning?
  • what is the output of ls -ld ~/.dbus/? who is the owner of the folder?
    – Yaron
    Jan 2, 2019 at 7:40
  • drwx------ 3 root root 4096
    – Salahuddin
    Jan 2, 2019 at 7:41
  • Find all those cases on your $HOME with find ~ -user root Jan 13, 2020 at 4:19

1 Answer 1


It seems like your ~/.dbus/ folder is owned by root instead of by your own user.

If this is the case, you can:

  1. Remove that folder, using:

    sudo rm -rf ~/.dbus


  1. Change the ownership to your-username / your-user-group using:

    sudo chown -R your-user-name.your-user-group-name ~/.dbus/

    Note: replace your-user-name.your-user-group-name with the actual values, e.g. if your user is sal and your group is also sal than it will be: sal.sal

As @Pablo Bianchi added in the comments below, $USER environment variable holds your-user-name (and in Ubuntu your-group-name is usually equal to your username) hence in most cases you can run the following command:

    sudo chown -R $USER.$USER ~/.dbus/

More info regarding Ubuntu environment variables can be found here

  • 1
    Thanks for your answer. But what is this directory for? Is it safe to just delete it?
    – Salahuddin
    Jan 2, 2019 at 7:46
  • Probably just $USER.$USER for your username:group Jan 11, 2020 at 5:09
  • @PabloBianchi - thanks for your comment! added the info to my answer
    – Yaron
    Jan 12, 2020 at 7:51

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.