Observed this issue on 12.04 LTS 32-bits and 64-bits versions. It
apparently only occurs when nobody is logged into the console (graphical
desktop) i.e. when the '/usr/lib/gvfs//gvfs-fuse-daemon -f
/var/lib/lightdm/.gvfs' process is running.
The below comment describes how to find out whether your system is
affected by this issue and some suggestions on how to work around it.
At the end of the day, as far as /var/lib/lightdm/.gvfs is concerned,
most of the findings described in earlier comments imho can be explained
perfectly well by the access permissions of /var/lib/lightdm/.gvfs.
The behavior of df when it comes to the gvfs-fuse-daemon mounts however
is inconsistent/flawed. Even when fuse.gvfs-fuse-daemon type mounts are
explicitly excluded using the --exclude-type option, df will still list
your private gvfs mounts, but perhaps that's something for another bug
:-)
Without any further ado:
# ensure nobody is connected to the console (graphical desktop) of the
offending host;
# connect to the offending host remotely e.g. using ssh
myuser@myhost2:~$ ssh myuser@myhost1
# list all mount points on the offending host and verify that
# /var/lib/lightdm/.gvfs is amongst them
myuser@myhost1:~$ mount
/dev/mapper/rootvg-rootlv on / type ext4 (rw,errors=remount-ro)
.
.
.
gvfs-fuse-daemon on /var/lib/lightdm/.gvfs type
fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=lightdm)
# verify that attempts to list the /var/lib/lightdm/.gvfs contents invariably
# result in 'Permission denied' errors even when executed with elevated
# privileges
myuser@myhost1:~$ ls -la /var/lib/lightdm/ | grep .gvfs
myuser@myhost1:~$ sudo ls -la /var/lib/lightdm/ | grep .gvfs
ls: cannot access /var/lib/lightdm/.gvfs: Permission denied
d????????? ? ? ? ? ? .gvfs
# this is because the only user allowed to list the contents of this
# 'private' mount is the lightdm user; the proof that lightdm is perfectly
# capable of listing the contents, is running the following command from the
cli:
myuser@myhost1:~$ sudo -u lightdm /bin/ls -la
/var/lib/lightdm/.gvfs
total 4
dr-x------ 2 lightdm lightdm 0 okt 6 14:17 .
drwxr-x--- 9 lightdm lightdm 4096 okt 6 14:17 ..
# now, if you just simply umount /var/lib/lightdm/.gvfs like so
myuser@myhost1:~$ sudo umount /var/lib/lightdm/.gvfs
# it will lose its 'private' character and it will become available
# as an accessible directory again to both yourself, the root user
myuser@myhost1:~$ ls -la /var/lib/lightdm | grep .gvfs
myuser@myhost1:~$ sudo ls -la /var/lib/lightdm/ | grep .gvfs
drwx------ 2 lightdm lightdm 4096 aug 12 15:13 .gvfs
# and to the lightdm user; do note that the dir has now become user writeable
# whereas previously it was only user readable(r) and user searchable(x)!
myuser@myhost1:~$ sudo -u lightdm /bin/ls -la
/var/lib/lightdm/.gvfs
total 8
drwx------ 2 lightdm lightdm 4096 aug 12 15:13 .
drwxr-x--- 9 lightdm lightdm 4096 okt 6 14:17 ..
# since the mount has now disappeared and the directory has returned to being
# an accessible directory again, df and tools like rsync and tar do not have
# issues with it anylonger
myuser@myhost1:~$ df -Ph
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-rootlv 1,9G 350M 1,4G 20% /
.
.
.
/dev/mapper/rootvg-usrloclv 3,7G 72M 3,5G 3% /usr/local
# when you're done rsync'ing or tar'ing or whatever, remember to
# reinstate the /var/lib/lightdm/.gvfs 'private' mount like so:
myuser@myhost1:~$ sudo service lightdm restart
lightdm stop/waiting
lightdm start/running, process 7677
# and verify that the /var/lib/lightdm/.gvfs shows up in the mount table
again
myuser@myhost1:~$ mount
/dev/mapper/rootvg-rootlv on / type ext4 (rw,errors=remount-ro)
.
.
.
gvfs-fuse-daemon on /var/lib/lightdm/.gvfs type
fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=lightdm)
# while the umount workaround is ok for (shell scripted) backups
# (that, by nature, often run with enhanced priviliges), you probably don't
want
# go through that for each df that you run from the cli, just to prevent the
annoying
# 'Permission denied' from popping up
myuser@myhost1:~$ df -Ph
df: `/var/lib/lightdm/.gvfs': Permission denied
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-rootlv 1,9G 350M 1,4G 20% /
.
.
.
/dev/mapper/rootvg-usrloclv 3,7G 72M 3,5G 3% /usr/local
# one elegant workaround for that would be to use the exclude-type option of df
# to exclude the fuse.gvfs-fuse-daemontype from the df output like so
myuser@myhost1:~$ df -Ph --exclude-type=fuse.gvfs-fuse-daemon
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-rootlv 1,9G 350M 1,4G 20% /
.
.
.
/dev/mapper/rootvg-usrloclv 3,7G 72M 3,5G 3% /usr/local
# and depending on your demands you might even want to create an alias
# for that or go wild and stuff the alias definition in your ~/.bashrc
# (if it's bash you're using, that is)
myuser@myhost1:~$ alias df='df --exclude-type=fuse.gvfs-fuse-
daemon'
# another, possibly even more elegant workaround for this 'issue' would be
# to become a member of the lightdm user group (i.e. add
# your userid to the lightdm group) like so
myuser@myhost1:~$ sudo usermod -a -G lightdm myuser
# subsequently log out
myuser@myhost1:~$ exit
logout
Connection to myhost1 closed.
# and log back in again to make your shell environment aware of your userid
# having been added to the lightdm group
myuser@myhost2:~$ ssh myuser@myhost1
# and enjoy the fact that the 'Permission denied' message has both finally
# and persistently disappeared from your df output
myuser@myhost1:~$ df -Ph
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-rootlv 1,9G 350M 1,4G 20% /
.
.
.
/dev/mapper/rootvg-usrloclv 3,7G 72M 3,5G 3% /usr/local
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to lightdm in Ubuntu.
https://bugs.launchpad.net/bugs/867806
Title:
df -h permission denied error
Status in Light Display Manager:
New
Status in “lightdm” package in Ubuntu:
Confirmed
Bug description:
Running "df -h" from the cli as a normal user returns:
Filesystem Size Used Avail Use% Mounted on
/dev/md0 37G 6.6G 29G 19% /
udev 796M 8.0K 796M 1% /dev
tmpfs 322M 888K 321M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 805M 92K 805M 1% /run/shm
/dev/sda3 1.8T 265G 1.6T 15% /mnt/d1
/dev/sdb3 1.8T 1.7T 102G 95% /mnt/d2
/dev/sdc3 893G 33M 893G 1% /mnt/d3
df: `/var/lib/lightdm/.gvfs': Permission denied
$
running with "su"
$ sudo df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md0 37G 6.6G 29G 19% /
udev 796M 8.0K 796M 1% /dev
tmpfs 322M 888K 321M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 805M 92K 805M 1% /run/shm
/dev/sda3 1.8T 265G 1.6T 15% /mnt/d1
/dev/sdb3 1.8T 1.7T 102G 95% /mnt/d2
/dev/sdc3 893G 33M 893G 1% /mnt/d3
$
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: bash 4.2-0ubuntu4
ProcVersionSignature: Ubuntu 3.0.0-10.16-server 3.0.4
Uname: Linux 3.0.0-10-server x86_64
ApportVersion: 1.23-0ubuntu2
Architecture: amd64
Date: Tue Oct 4 14:17:28 2011
InstallationMedia: Ubuntu-Server 11.04 "Natty Narwhal" - Release amd64
(20110426)
ProcEnviron:
SHELL=/bin/bash
LANG=en_US.UTF-8
SourcePackage: bash
UpgradeStatus: Upgraded to oneiric on 2011-09-05 (29 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/lightdm/+bug/867806/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp