I have a folder
~/.dbus in my homefolder that is only read and writeable by root:
drwx------ 3 root root 4096 Feb 17 17:30 . drwx------ 2 root root 4096 Feb 17 17:30 session-bus
Is this the correct setting? Or if not, how could that happen?
The reason for these being created with root ownership in the first place is usually the way
sudo preserves some user environment.
ls: cannot access .gvfs: Permission denied
.cache with all it contents is supposed to be owned by the user whom the home directory belongs to.
It is usually safe to delete either, it will be recreated next time you login (it is just a cache that would have gone obsolete eventually).
# be careful what you type when you use rm -rf! sudo rm -rf ~/.dbus
Keep in mind that
.gvfs behaves somewhat special since it's a mount point (check the output of
mount to confirm). As long as you have network folders mounted, don't touch it.
Alternatively you could just make yourself the owner of this folder recursively.
sudo chown -R username:username .dbus
I know the only reason many people know about this folder is because they backup their home directory and get errors from their backup software.