delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/03/08:36:12

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 3 Sep 2004 08:28:33 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: luke DOT kendall AT cisra DOT canon DOT com DOT au
cc: cygwin AT cygwin DOT com
Subject: Re: How does a script find where Cygwin is installed?
In-Reply-To: <20040903071705.D26FB8512B@pessard.research.canon.com.au>
Message-ID: <Pine.GSO.4.61.0409030823200.28876@slinky.cs.nyu.edu>
References: <20040903071705 DOT D26FB8512B AT pessard DOT research DOT canon DOT com DOT au>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Fri, 3 Sep 2004, luke.kendall wrote:

> $ CYGPATH=`cygpath -w /`
> $ echo $CYGPATH
> C:\cygwin
> $ CYGPATH=`cygpath -u "$CYGPATH"`
> $ echo $CYGPATH
> /
>
> What I really want to get is "C:/cygwin"

$ cygpath -m /

> or "/cygdrive/c/cygwin", in my case.

$ cygpath -m / | sed 's,^\([A-Za-z]\):,/cygdrive/\1,'

> Look at the weird messages I get from this chmod:
>
> $ chmod -R ug+rwX,o+rX /
> chmod: getting attributes of `//bin: No such file or directory
> [snip similar messages]

This is a bug in chmod -R that manifests in Cygwin.  The real solution is
to fix chmod, in lines 236-241 of chmod.c in fileutils-4.1-2.  A
workaround would be

$ cd / && chmod -R ug+rwX,o+rX .

(or, a bit simpler, "cd / && chmod -R a+rX,ug+w .")...

> (I'm doing this to try to ensure that if a SysAdmin user installs
> Cygwin for the actual owner of the machine, the owner will later have
> permission to update or even uninstall Cygwin themselves.)

HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019