Problem uninstalling/deleting cygwin - Solved

Igor Pechtchanski pechtcha@cs.nyu.edu
Wed Jan 26 16:42:00 GMT 2005


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@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.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/



More information about the Cygwin mailing list