OT: find command permissions: how to exclude dir?

Dave Burns tburns at hawaii.edu
Wed Oct 29 22:27:32 UTC 2008


I have a cron job that runs 'find /' as root, keeps blowing up when
encountering ~/.gvfs in my home dir. Permissions are set like so:

 ls -la ~/.gvfs
total 4
dr-x------  2 tburns isys    0 2008-10-13 07:43 .
drwxr-xr-x 73 tburns root 4096 2008-10-24 11:49 ..

As owner of dir, no problem:
 find /users/tburns  ! -name .gvfs |grep gvfs

As root, boom:
sudo  find /users/tburns  ! -name .gvfs |grep gvfs
[sudo] password for tburns:
find: /users/tburns/.gvfs: Permission denied

When I create another similar directory, same permissions, root has no
problem with it. But note ***the copy has a different file size
(original size=0, copy size=4096)***:
[tburns at cod ~]$ cp -pr .gvfs .gvfscopy
[tburns at cod ~]$ ls -la .gvfscopy
total 8
dr-x------  2 tburns isys 4096 2008-10-13 07:43 .
drwxr-xr-x 76 tburns root 4096 2008-10-29 10:56 ..
[tburns at cod ~]$ sudo  find /users/tburns/.gvfscopy
/users/tburns/.gvfscopy


.gvfs is using some secret sauce that I don't understand to prevent
root from accessing it.  Is there some ACL stuff going on here?
(getfacl results are boring.) File locking? (lsof says it is not
open.) Corruption? How can it be that root is denied? I wonder what
would happen if I deleted .gvfs and recreated it manually with
identical permissions?

I tried googling gvfs and permissions, got many many irrelevant hits.
Some hits described a similar problem, but always veer off to a
workaround for their specific situation, no general solution. Please
at least give me a hint what to do or what to google for.

My brain hurts!

Dave




More information about the fedora-list mailing list