[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

OT: find command permissions: how to exclude dir?



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 cod ~]$ cp -pr .gvfs .gvfscopy
[tburns 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 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]