Red Hat Bugzilla – Bug 432163
colorls default settings cannot be disabled
Last modified: 2008-02-11 09:35:25 EST
Description of problem:
Suppose one is happy with ls/colorls but not happy with the "ow"
(OTHER_WRITABLE) setting. And one wants to never show that attribute, but fall
back to other attributes (like directory, pipe, etc). It isn't possible.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. ensure LS_COLORS env is set without a "ow" entry
2. mkdir test; chmod o-w test
3. ls --color=tty -d test
4. chmod o+w test
5. ls --color=tty -d test
3. displays with directory color ("di", possible unreadable dark blue)
5. displays with "ow" color (green background)
There should be a way to set "ow" to undefined or unset rather than the
compiled-in default. And also the code in ls.c should check that an attribute is
defined before making final determination of how to display it. That is, if
"ow" is unset then it should fall back to directory attribute.
All attributes should be unset by default, because it is perfectly ok to define
them all in users environment.
Thanks for report, as an easy workaround you could set LS_COLORS ow entry to
standard dir color(OTHER_WRITABLE is used only for dirs).
I can't make a fork of ls in this case (there will be more necessary changes in
code, not only drop of defaults) and I doubt that upstream will accept drop of
current default color settings (because /etc/DIR_COLORS which defines color set
in LS_COLORS by default is not upstream file). WONTFIX for me ...