This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Access rights for directories
- From: Igor Peshansky <pechtcha at cs dot nyu dot edu>
- To: Eric Lilja <mindcooler at gmail dot com>
- Cc: cygwin at cygwin dot com
- Date: Wed, 31 May 2006 19:18:11 -0400 (EDT)
- Subject: Re: Access rights for directories
- References: <e5l60v$2qn$1@sea.gmane.org>
- Reply-to: cygwin at cygwin dot 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/