bug-coreutils
[Top][All Lists]
Advanced

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

bug#13635: Strange ls bug (Combination of -a and --color)


From: Paul Eggert
Subject: bug#13635: Strange ls bug (Combination of -a and --color)
Date: Wed, 06 Feb 2013 15:40:53 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

My guess is that 'csf' is readable but not searchable.
That would explain your symptoms:

$ ls -ld csf
dr--------. 2 eggert eggert 4096 Feb  6 15:31 csf
$ ls -ld csf/.
ls: cannot access csf/.: Permission denied
$ ls --color=always -a csf
ls: cannot access csf/.: Permission denied
ls: cannot access csf/..: Permission denied
.  ..

In the last example, 'ls' needs to stat csf/. and csf/..
to see whether their permissions are weird (since directories
with weird permissions are given different colors), but
it cannot do so since csf lacks search permission.

One possible fix would be to alter 'ls' so that, if 'ls' cannot
find out about a file, it gives the file an even weirder
color.  That might be more useful than the current behavior.
Is this something you could write?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]