Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Fri, 26 Dec 2003 10:53:40 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Hanguk MY cc: cygwin AT cygwin DOT com Subject: Re: Cannot delete shortcuts under windows XP In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 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! "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/