GNU bug report logs - #13635
ls: use different color for unreadable files

Previous Next

Package: coreutils;

Reported by: Joshua Rogers <megamansec <at> gmail.com>

Date: Wed, 6 Feb 2013 07:58:02 UTC

Severity: wishlist

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Joshua Rogers <megamansec <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Strange ls bug (Combination of -a and --color)
Date: Wed, 06 Feb 2013 18:55:49 +1100
[Message part 1 (text/plain, inline)]
Hi,

I'm using 'ls' and I'm encountering a pretty strange bug.

I just rsync'd my remote server for backup, and on my local machine I
run the command 'ls -lh csf/'
Well.. Here's the result;

$ ls -lh csf/
ls: cannot access csf/.: Permission denied
ls: cannot access csf/..: Permission denied
total 0
d????????? ? ? ? ?                ? .
d????????? ? ? ? ?                ? ..


running just 'ls csf/'
$ ls csf/
ls: cannot access csf/.: Permission denied
ls: cannot access csf/..: Permission denied
.  ..


It appears to be outputting the information, even though it should be
exiting after it says permission denied.

I've tried rm -rf csf/ and re-rsyncing it, but the problem persists.


My .bashrc;
    alias ls='ls -aC --color=auto'


Running '/bin/ls csf/'
just results in a newline.

running '/bin/ls -aC' doesn't cause the error, neither does '/bin/ls -C
--color=auto csf/'
But, '/bin/ls -a --color=auto csf/' DOES.
So it seems to be the combination of --color and -a.

Thanks


-- 
*Joshua Rogers* - Retro Game Collector && IT Security Specialist
gpg pubkey <http://www.internot.info/docs/gpg_pubkey.asc.gpg>
[Message part 2 (text/html, inline)]

This bug report was last modified 6 years and 243 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.