This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cannot delete shortcuts under windows XP

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)
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,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:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]