This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Cannot delete shortcuts under windows XP
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: Hanguk MY <myhanguk at hotmail dot com>
- Cc: cygwin at cygwin dot com
- Date: Fri, 26 Dec 2003 10:53:40 -0500 (EST)
- Subject: Re: Cannot delete shortcuts under windows XP
- References: <BAY7-F29DnKgXhLy4Wn00003e68@hotmail.com>
- Reply-to: cygwin at cygwin dot com
On Fri, 26 Dec 2003, Hanguk MY wrote:
> Hi,
>
> I reinstalled Windows XP pro and tried to manually delete the C:\cygwin
> folder, but I can not delete any of the "shortcuts" in the various folders
> (such as the hosts, networks and protocol shortcuts,.. etc). I get an
> "access denied" message: "the file is either write protected or in use"...,
> even when I'm logged on as administrator.
>
> How do I remove these files ???
>
> Thank you for your help and comments !
> Myhanguk
When using Windows shortcuts for symlinks, the symlink shortcuts are
marked read-only. The owner should be able to remove even read-only
files, so I'm assuming the owner changed (since you reinstalled XP). If
this is the reason you want to erase c:\cygwin (to reinstall Cygwin from
scratch), consider using 'chown -R --from=UID:GID' instead... Simply
prepend the output of 'mkpasswd -c' to /etc/passwd (you can keep a backup
copy), and then run 'chown -R --from=OLDUID:OLDGID NEWUID:NEWGID /'. You
may need to repeat this for all of the old UIDs... You may also need to
change the groups in a similar way ('man chown' for details). Then
regenerate /etc/passwd from scratch, and you're set.
If you still plan to erase the c:\cygwin folder, simply remove the
read-only attribute recursively (using the Windows Explorer security
properties dialog). Beware of the stale mounts that you're leaving that
way -- better issue a 'umount -A' before erasing the root folder. Also
make sure you have no Cygwin services (e.g., 'cron', 'inetd', 'sshd', etc)
installed.
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!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton
--
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/