X-Spam-Check-By: sourceware.org
Date: Wed, 31 May 2006 19:18:11 -0400 (EDT)
From: Igor Peshansky <pechtcha@cs.nyu.edu>
Reply-To: cygwin@cygwin.com
To: Eric Lilja <mindcooler@gmail.com>
cc: cygwin@cygwin.com
Subject: Re: Access rights for directories
In-Reply-To: <e5l60v$2qn$1@sea.gmane.org>
Message-ID: <Pine.GSO.4.63.0605311857330.25990@access1.cims.nyu.edu>
References: <e5l60v$2qn$1@sea.gmane.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Thu, 1 Jun 2006, Eric Lilja wrote:

> Hello, I'm using rxvt and I'm having a problem that folders I create (I
> create both from inside rxvt and using explorer) have different rights
> and thus are color-coded differently by rxvt. First I thought that
> directories created using cygwin's mkdir got one set of access rights
> and those created using explorer got another set. But I just tried in a
> test directory and the two directories got the same (the correct) access
> rights..so I don't know exactly when this occurs.
>
> $ ls -al
> total 0
> drwxr-xr-x+  4 mikael None 0 Jun  1 00:33 ./
> drwxrwxrwx+ 10 mikael None 0 Jun  1 00:33 ../
> drwxr-xr-x+  2 mikael None 0 Jun  1 00:31 fromcygwin/
> drwxr-xr-x+  2 mikael None 0 Jun  1 00:33 fromexplorer/
>
> The only weird looking directory is the special .., and it's color-coded
> blue-on-green instead of blue-on-black. And I created test using
> mkdir...anyone know what's going on and is there a way to make sure all
> directories are created using the same access rights unless I explicitly
> state differently?

It's not rxvt that's coloring your directories -- it's ls (via the
DIR_COLORS mechanism).  The default colors have changed in the new
coreutils, and are coloring world-writeable directories (which is what
Explorer creates by default) differently.  You can turn that off by
editing /etc/DIR_COLORS to change the lines that contain "OTHER_WRITABLE"
to

STICKY_OTHER_WRITABLE 01;34 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 01;34 # dir that is other-writable (o+w) and not sticky

that will color those directories the same as your normal ones.  You will
also need to uncomment the bit in your /etc/profile that says

eval "`/usr/bin/dircolors -b /etc/DIR_COLORS`"

The only caveat is that the /etc/DIR_COLORS that comes with coreutils
isn't quite the default directory colors, so you'll see some other weird
changes in directory colors.  You can also use "dircolors -p" to print the
current database, and then change the above 2 values.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

