Bug 432163

Summary: colorls default settings cannot be disabled
Product: [Fedora] Fedora Reporter: JW <ohtmvyyn>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8CC: twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-11 09:35:25 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description JW 2008-02-09 04:41:45 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):

How reproducible:

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
Actual results:
3. displays with directory color ("di", possible unreadable dark blue)
5. displays with "ow" color (green background)

Expected results:
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.

Additional info:
All attributes should be unset by default, because it is perfectly ok to define
them all in users environment.
Comment 1 Ondrej Vasik 2008-02-11 09:35:25 EST
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 ...