[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug found from ls command
From: |
PG |
Subject: |
Re: bug found from ls command |
Date: |
Tue, 7 Jul 2009 09:36:27 -0700 |
ah, great!
thank you for the info. That helps me understand a lot. Now I see why find
fails. And perhaps it's not worth the extra computation time required to,
upon failure of cd'ing into the directory, trying to list it.
I still think there should be an option for find that one could turn on that
would do everything possible to find a certain filename.
Thanks for the explanations.
2009/7/7 Philip Rowlands <address@hidden>
> On Mon, 6 Jul 2009, PG wrote:
>
> address@hidden:/home/xinwei/bugreport# ls -l
>> total 4
>> d---r--r-- 2 root root 4096 2009-07-05 13:27 protected
>>
>
> address@hidden:~/bugreport$ ls -l protected/
>> ls: cannot access protected/canttouchthis: Permission denied
>> total 0
>> -????????? ? ? ? ? ? canttouchthis
>>
>
> http://www.gnu.org/software/coreutils/manual/html_node/Mode-Structure.html
> ---
> There are three kinds of permissions that a user can have for a file:
>
> 1. permission to read the file. For directories, this means
> permission to list the contents of the directory.
> ---
>
> A directory with "read" permission allows the directory to be listed. This
> is not a bug.
>
>
> address@hidden:~/bugreport$ find ./ -name canttouchthis
>>
>
> Curiously I get a different error here:
>
> $ find ./ -name canttouchthis
> find: ./protected: Permission denied
>
> In theory find could show the file, but it attempts to chdir into the
> directory before listing, which is not allowed by the directory permissions.
>
>
> Cheers,
> Phil
>