2

I downloaded Cygwin, did something wrong, deleted it entirely, and reinstalled it.

Somehow I then did something very wrong with the result that I now have absolutely no permissions on any account to do anything to the .SSH folder, even though I'm the administrator. Here's everything I've tried but with no effect:

  1. Deleted the Cygwin .reg files
  2. Deleted all the Cygwin files that I could
  3. Gone to the Security tab and tried to change permissions from ANY account
  4. Tried deleting the folder using cmd
  5. Booted into safe mode and tried deleting from there

Any ideas how I can fix this?

Gaff
  • 18,569
  • 15
  • 57
  • 68
Christian
  • 123
  • 2
  • Are you able to take ownership of the folder? – bwDraco Jun 11 '11 at 17:02
  • I wish. Under the security tab, all of the options are grayed out. – Christian Jun 11 '11 at 17:04
  • Have you run `CHKDSK` on the volume? – bwDraco Jun 11 '11 at 17:05
  • Hmm I have not. How do I go about that? – Christian Jun 11 '11 at 17:07
  • 1
    @vorbis5: Are you sure you tried taking *ownership*? Or did you just try changing the permissions? The Ownership tab is in the Advanced dialog, separate from the Permissions tab. – user541686 Jun 11 '11 at 17:10
  • @vorbis5: Also, what is the file name? Maybe it's a weird name Windows doesn't like to handle. – user541686 Jun 11 '11 at 17:11
  • Right-click on the volume in **Computer**, select **Properties**, select the **Tools** tab, and click **Check now...** under **Error-checking**. In the dialog that follows, click **Start**; you do not need to change any other settings. You will likely need to restart the computer; when you do, you will get a command line for `CHKDSK`, which will start automatically if you do not press a key for ten seconds. – bwDraco Jun 11 '11 at 17:13
  • @Mehrdad, the file name is `.ssh`. This looks like a security-sensitive folder (it likely holds SSH keys). – bwDraco Jun 11 '11 at 17:14
  • Well I don't have access to this particular folder. It won't even let me enter into this ".ssh" folder at all. – Christian Jun 11 '11 at 17:14
  • @vorbis5: There doesn't happen to be another file/folder with a name that has a different capitalization than `.ssh` but in the same place, right? (This is possible in Windows, and you can get really weird problems with it.) Also, is the folder a junction by any chance? – user541686 Jun 11 '11 at 17:19
  • Nope. There is not. – Christian Jun 11 '11 at 17:20
  • @vorbis: Try running this on the command line: `TakeOwn /F YOUR_FOLDER_PATH /R /A` – user541686 Jun 11 '11 at 17:21
  • @vorbis5: No worries, I'll post it as an answer. :-) – user541686 Jun 11 '11 at 17:27

2 Answers2

5

I have a suspicion you were changing permissions with the Security dialog, rather than taking ownership, and that's why it didn't work (you weren't the owner).

Try this on the command line:

TakeOwn /F YOUR_FOLDER_PATH /R /A

This will make the Administrators group the owners. (You can take off /A to make yourself the owner.)

user541686
  • 23,663
  • 46
  • 140
  • 214
4

try booting Ubuntu Live CD (or any Linux), and find the file in your hard disk, and delete...

studiohack
  • 13,468
  • 19
  • 88
  • 118
darkprop
  • 41
  • 1
  • Never used linux before. Is it possible to install linux and keep my windows 7? – Christian Jun 11 '11 at 17:12
  • 2
    You do not need to install Linux. Since this is a live CD, you can start Linux without making any changes to the system. While running the live CD, you can access the volume and remove the offending folder. Linux does not honor NTFS permissions, so if the filesystem isn't damaged, you should be able to remove it. – bwDraco Jun 11 '11 at 17:16
  • linux live cd don't need installation... u can run without install... only boot from ubuntu/linux cd... and select try... access your hard drive and find the file and delete – darkprop Jun 11 '11 at 17:18
  • Is this cd a physical cd? Because I don't have that. – Christian Jun 11 '11 at 17:21
  • I tried this. When I booted back to Windows, I had a .Trash-xxx folder instead at the same size of the deleted material, and which I still can not delete – erikric Jan 23 '12 at 21:49