Whenever I run an application in terminal as root (such as sudo gedit /etc/default/varnish
) , subsequently when I open another terminal I get "ls: cannot access .gvfs: Permission denied" error at top line of terminal.
I found a solution on the net
umount /path/to/.gvfs
rm -rf .gvfs
but it only fixes problem temporarily.
It appears that I have two mounted instances of gvfs in my system
$ sudo mount |grep gvfs
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=33)
gvfsd-fuse on /home/****/.gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
I don't know if it's related to, a few months ago I had to change permission in my home folder like
sudo chown -R $USER:www-data
Would you please help me fix it?
EDIT:
After I unmount /run/user/1000/gvfs
I don't get that error.