Gordon Messmer wrote:
Rick Stevens wrote:
Gordon Messmer wrote:
You need to tell find what to do with files not named .gvfs:

find /users/tburns -name .gvfs -prune -o -print

Will not work.  As soon as the non-owner of .gvfs does a stat on the
directory, the error will be spit out.  find must "stat()" any item
it finds to handle the remainder of the predicate and POP goes the
error.

If -name is the first predicate, and you prune matches, find will not need to stat() the directory entry:

[EMAIL PROTECTED]:~/tmp/findtest]$ find . -print
.
./noread
find: `./noread': Permission denied
./read
./read/file

[EMAIL PROTECTED]:~/tmp/findtest]$ find . -name noread -prune -o -print
.
./read
./read/file

Sorry, won't work for GVFS filesystem mountpoints. As soon as the non-owner touches the inode, the error occurs. Just a couple of tests
(I'm redirecting stdout just to get rid of the stuff extraneous to the
discussion):

As owner:
        [EMAIL PROTECTED] ~]$ ls -lad .gv*
        dr-x------ 2 rick rick 0 2008-11-04 18:00 .gvfs
        [EMAIL PROTECTED] ~]$ find . -name ".gvfs" -prune -o -print \
        >/dev/null
        [EMAIL PROTECTED] ~]$

As root:
        [EMAIL PROTECTED] rick]# find . -name ".gvfs" -prune -o -print \
        >/dev/null
        find: ./.gvfs: Permission denied
        [EMAIL PROTECTED] rick]#

Note that test was on F9, x86_64.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer                      [EMAIL PROTECTED] -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-  Jimmie crack corn and I don't care...what kind of lousy attitude  -
-                 is THAT to have, huh?   -- Dennis Miller           -
----------------------------------------------------------------------

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Reply via email to