delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/26/10:04:30

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: Wed, 26 Jan 2005 10:04:17 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Neven Luetic <Neven DOT Luetic AT hanse DOT net>
cc: cygwin AT cygwin DOT com
Subject: Re: Problem uninstalling/deleting cygwin - Solved
In-Reply-To: <1106738811.8872.41.camel@linuxpc.lune>
Message-ID: <Pine.GSO.4.61.0501260956360.8430@slinky.cs.nyu.edu>
References: <1106670496 DOT 10021 DOT 18 DOT camel AT linuxpc DOT lune> <1106738811 DOT 8872 DOT 41 DOT camel AT linuxpc DOT lune>
MIME-Version: 1.0

On Wed, 26 Jan 2005, Neven Luetic wrote:

> > after a (stupid) attempt to install an older version of cygwin over my
> > current installation (using the "cygwin time machine" mentioned some
> > days ago) I just wanted to throw it away and start anew, but the cygwin
> > directory is undeletable.
> >
> > This is due to some symbolic links from versions of uninstalled programs
> > pointing to nowhere (i.e. /usr/autotool/devel/bin/automake, which is a
> > symlink to automake-1.9).
> > I am able to change owner and permissions of these files to whatever I
> > want, but I can not delete them ("Permission denied").
> >
> > What should I do, to get a clean new install?
>
> Although I am sure to have installed both versions as the same user (I
> always use a domain login), those links are owned by my computer login.
> When I change ownership via windows explorer and set the permissions I
> need, everything can be deleted.
>
> This didn't work with cygwin. Although I was able to change the
> ownership of the links to any user I wanted, I was not able to delete
> them.

Cygwin's "chown" can only change ownership to those users that are in the
/etc/passwd file.  If you had two users with the same name or id in it
(e.g., local and domain), the one that appears earlier will hide the one
that appears later.

AFAIU, if you'd made sure that your /etc/passwd is up-to-date, you could
have changed the ownership.  One guess as to why the links were owned by
the local user is that some script may have done a "chown $USER", and if
the local and the domain user have the same names, and the local appears
earlier in /etc/passwd...  well, you get the picture.

FWIW, we should probably look at all scripts to see which ones do "chown
$USER", and change it to "chown `id -u`" instead, which should be safer...
	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!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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