6

I was running rsnapshot as root and I got the following error. Why would this happen? what is .gvfs?

rsnapshot weekly                                                                    slave-iv
rsync: readlink_stat("/home/griff/.gvfs") failed: Permission denied (13)
IO error encountered -- skipping file deletion
rsync: readlink_stat("/home/xenoterracide/.gvfs") failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1042) [sender=3.0.7]
Martin Schröder
  • 939
  • 1
  • 10
  • 35
xenoterracide
  • 57,918
  • 74
  • 184
  • 250

2 Answers2

9

.gvfs directories are mount points (sometimes). You may want to use the one_fs option in your rsnapshot configuration (so that it passes --one-file-system to rsync).


Gvfs is a library-level filesystem implementation, implemented in libraries written by the Gnome project (in particular libgvfscommon). Applications linked with this library can use a filesystem API to access ftp, sftp, webdav, samba, etc.

Gvfs is like FUSE in that it allows filesystems to be implemented in userland code. FUSE requires the one-time cooperation of the kernel (so it's only available on supported versions of supported OSes), but then can be used by any application since it plugs into the normal filesystem API. Gvfs can only be used through Gnome libraries, but doesn't need any special collaboration from the kernel so works on more operating systems.

A quick experiment on Ubuntu 10.04 shows that while an application is accessing a Gvfs filesystem, ~/.gvfs is a mount point for a gvfs-fuse-daemon filesystem. This filesystem allows any application to access Gvfs filesystems, without needing to link to Gnome libraries. It is a FUSE filesystem whose implementation redirects the ordinary filesystem calls to Gvfs calls.

The gvfs-fuse-daemon filesystem does not allow any access to the root user, only to the user running the application (it's up to each individual filesystem to manage the root user's permissions; a classic case where root doesn't have every power is NFS, where accesses from root are typically mapped to nobody).

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
  • *%$#@!* gnome! I don't even use gnome! prolly chrome or pidgin creates this... hmm... I'm not particularly concerned that it's not backing up, they aren't seemingly being used anyways. – xenoterracide Oct 29 '10 at 22:54
  • 2
    just as a note I just tried `one_fs` and still received the error. – xenoterracide Oct 29 '10 at 23:28
  • 1
    @xenoterracide: You might not use the Gnome desktop environment, but you are using applications that link against Gnome libraries. There might be a way to tell Gnome not to start the daemon, I haven't looked. I suspect that the `one_fs` option isn't working because rsync is somehow getting a permission denied as part of its check as to whether `.gvfs` is a mount point. – Gilles 'SO- stop being evil' Oct 30 '10 at 00:01
  • :S this would be really annoying if it were a cron job, because it would be emailing me each time. I wonder if an --exclude would work. – xenoterracide Oct 30 '10 at 00:32
  • @xenoterracide: `--exclude` works. – Martin Schröder Dec 27 '11 at 22:02
-4

It is unwise to create a mountpoint inside ~user.

You get problems in case ~user is NFS, you get problems with tools (eg. rdist, dump).

UNIX is NET + Multiuser

Create your mountpoints in: e.g. /gfvsmount/USER/... or /tmp/gfvsmount/USER/...

For design: read old amd/automount papers!

jasonwryan
  • 71,734
  • 34
  • 193
  • 226
uli
  • 1
  • 1
    Way to necro a long dead question, but 1) this is how gvfs works, it is not something the questioner did and 2) this does not answer the question. Also `dump` does not know or care about mount points, either in your home dir or otherwise. – psusi Dec 05 '12 at 18:55