Question: Similar to [rm on cygwin, cannot unlink not owner](https://superuser.com/questions/61197/rm-on-cygwin-cannot-unlink-not-owner), but for MINGW32. I tried chmod u+w path but this did not help.

```
user@computer /d
$ rm dir -d
rm: cannot unlink `dir': Not owner

user@computer /d
$ chmod u+w dir

user@computer /d
$ rm dir -d
rm: cannot unlink `dir': Not owner

```

Answer: 
I don't know mingw but on "real" \*nix systems you need write access to the parent dir. You don't specify the permissions of "dir" or it's parent directory but I assume that is the problem here as well.
From the looks of it, it seems like you're trying to 'rm' a directory ("dir"). "rmdir" would rather do the trick.

Otherwise, other things that come to mind:

1. Can you remove the file from windows explorer or a dos prompt? If yes, then it could be a mingw bug.
2. If the file is marked as "read-only" then you can't rm it.