GNU bug report logs -
#13635
ls: use different color for unreadable files
Previous Next
Full log
View this message in rfc822 format
Joshua Rogers wrote:
> $ ls -ld csf
> drw------- 2 toil toil 4096 2013-02-05 19:26 csf
Yes. :-)
> So it seems that you may be correct.
> That chmod fixes the problem,
Yes. You said you rsync'd data from another machine. Was the
permissions copied from the remote machine the same there?
> But it is still a bug that it does not exit if it does have
> permissions, and has color on.
Sorry but I don't understand what you are saying. The ls command
didn't create the directory with that permission. The ls command
simply reported it. That isn't a bug in ls. And I am sure not a bug
in rsync either since I am sure that rsync just copied the source
permissions directly. I think this is all expected behavior.
If either --color or -l is specified then it will cause ls to need to
stat(2) each entry in order to get information about it. But it can't
stat without the 'x' bit allowing it. So it reports what it can which
is simply the file name and nothing more. And of course the program
does exit afterward.
Using 'ls -l' reports both "." and ".." and therefore they are listed
by name but without the missing attributes. Using 'ls' without -l
does not report "." and ".." and therefore reported nothing but a
newline.
Bob
This bug report was last modified 6 years and 244 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.