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

Re: OT: find command permissions: how to exclude dir?

Dave Burns wrote:
On Wed, Oct 29, 2008 at 1:34 PM, Frank Cox <theatre sasktel net> wrote:
On Wed, 29 Oct 2008 12:27:32 -1000
check whether .gvfs is a mounted
filesystem (it probably is).


Why can root not access it?
Perhaps because there is no read permission in the mount point?

I created an identical directory with identical permissions, root and
find have no problem with that one. I think the key was mentioned by
Todd - 'the callbacks and such used when referencing it only exist in
the owner's Gnome instance.'

That was me (Rick).

                              Which I take it to mean, when find (as
root) calls some low-level routine, bad things happen.

No, no bad things, but there's no callbacks in place for root to use
to search that filesystem...they only exist in tburns' Gnome instance.

So... bro has no suggestion for a workaround?

Nope.  As soon as find sees that name it'll barf.  It won't stop the
find, just spit out an error.  You could aim stderr to /dev/null if
you want.  Examples:

	[root bigdog ~]# find /home/rick -name "fred"
	find: /home/rick/.gvfs: Permission denied

	[root bigdog ~]# find /home/rick -name "fred" 2>/dev/null

It ain't pretty, but it'll work.
- Rick Stevens, Systems Engineer                      ricks nerd com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
- Millihelen, adj: The amount of beauty required to launch one ship. -

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