Re: ls --color



On Sun, 5 Feb 2006 15:38:16 +0000, chris-usenet@xxxxxxxxxxxx
<chris-usenet@xxxxxxxxxxxx> appears to have said:

Fraser Sinclair <dummy@xxxxxxxxxxxxx> wrote:
dircolors just forms LS_COLORS.

Exactly.

Don't forget LS_OPTIONS.

"ls" colors executables even if they
are not in LS_COLORS

No it doesn't.

It will if $LS_OPTIONS has "--color=auto" or "--color=always" set.

(a) Your "ls" will have been aliased to "ls --colors" to even add
the colours in the first place.

In my case, it's aliased to "/bin/ls $LS_OPTIONS", and LS_OPTIONS is
set to "--color=auto -F -b -T 0". If you really want to see what ls
will output with *no* interference from dircolors, just type "/bin/ls"
instead of the aliased "ls".

(b) Re-read the documentation for "dircolors"

If the /etc/DIR_COLORS file is as well commented as the one on my
Slackware box, (I guess it's the stock file from the GNU coreutils
distribution) it's an informative read, as well.


Back at the top of the thread, Fraser Sinclair wrote:

The colors are useful but not yet on samba connections to windows
boxes because they need to be mounted +x to run cmd files.

You mount the shares with perms that allow execute permission for all
files? Sounds dangerous to me.

all the files listed with ls to be colored with the exe color.
Removing this color from LS_COLORS does no good because if a file has
execute permission the file extension colors are ignored.

I *think* the reason you can't change it by removing the EXEC color from
/etc/DIR_COLORS is that the default is compiled into /bin/ls. Anyhow...
if you really want to unset the color for executable files, just set
EXEC to "00" in DIR_COLORS. I'd be looking for a better way to manage
exec perms through mount/samba options, or something, though.

cya,
Jonathan

--
Don't just hit reply. Email address is broken. Thank
your friendly neighborhood spammer. Email replies to:
user: daboid domain: cox<dot>net
.



Relevant Pages

  • Re: ls --color
    ... You mount the shares with perms that allow execute permission for all ... I *think* the reason you can't change it by removing the EXEC color from ... EXEC to "00" in DIR_COLORS. ... exec perms through mount/samba options, or something, though. ...
    (comp.os.linux.misc)
  • Re: SQL2000 UserPermissions for Database
    ... EXECUTE permission denied on object 'usp_ListDatabasesForLogin', ... database 'databaseA', owner 'dbo'. ... GRANT EXEC ON dbo.usp_ListDatabasesForLogin TO userx ...
    (microsoft.public.sqlserver.security)
  • What is the best combination of Roles/permission?
    ... Create a Role e.g AppRole which has Execute permission ... I don't have Sysadmin Account. ... @loginlang N'us_english') ... exec sp_addrole N'AppRole' ...
    (microsoft.public.sqlserver.security)
  • Re: ls --color
    ... My point was that you can get the database color or you can redefine "EXEC" to something else but I don't think you can get rid of it --- it has to be something. ... Whatever it ends up will override any file extension colors if a file has execute permission. ...
    (comp.os.linux.misc)
  • Preventing rsh, rlogin, and rcp
    ... What is required to prevent all rsh, rlogins, rcp, etc from one system to ... "login", and "exec"? ... Will removing those lines have any effect on any other functions? ...
    (Tru64-UNIX-Managers)