I've been using Tortoisehg for a while now, with little to no problems but have just run into the following problem:

I cannot push or commit to my main repository. I made a small change to one file in my project, committed locally with no problem, but the push to the main repo fails:

```
% hg --debug push "Z:\[main repo]"
pushing to Z:\[main repo]
query 1; heads
searching for changes
all remote heads known locally
listing keys for "bookmarks"
1 changesets found
list of changesets:
09d372b8d90710f2ad772dc4164fd640d6869208
adding changesets
add changeset 09d372b8d907
adding manifests
adding file changes
adding GEM.py revisions
transaction abort!
rollback completed
abort: Permission denied: Z:\[main repo]\.hg/store\data\._g_e_m.py.i-dmz4wn
[command returned code 255 Thu Mar 09 14:17:01 2017]

```

The main repo is on a (Windows) file server, and I am submitting from a Windows machine. I am sure that I have not run out of quota.
I have not changed permissions on the main repo, I am owner of all data and have also tried assigning myself "full control" (by default I have only read and write -- not sure what the difference is, actually), to no avail.

I also tried editing the changed file in the main repo and committing there:

```
% hg commit --verbose "--message=GEM.py: [message]" --user [user] -- "Z:\[main repo]\GEM.py"
GEM.py
trouble committing GEM.py!
abort: Permission denied: Z:\[main repo]\.hg/store\data\._g_e_m.py.i-kbxvue
[command returned code 255 [date]]

```

Now, an interesting thing is that the file that Mercurial complains about does not seem to exist in the first place. There is only a file called `_g_e_m.py.i` in that directory. I made sure to have hidden files shown in the file manager, and I've also looked from Linux, just to make sure.
I also tried cloning the repo to a different location, then pushing to the new repo, but that changes nothing.

I have found [this answer](https://stackoverflow.com/questions/18536614/tortoisehg-suddenly-fails-with-unable-to-remove-file-xxx-permission-denied) on this site, but I do not have a file `.hg/wlock` (or anything named similarly) in the repo folder.

**Update:**
Since was asked: The permissions for the .hg/store/data dir on the main repo are:

```
.hg [domain]\Domain Admins:(I)(OI)(CI)(F)
    NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
    [domain]\[user]:(I)(OI)(CI)(M)

```

On my local one, it's:

```
.hg Everyone:(I)(OI)(CI)(F)

```

So there's a difference. Within the .hg directory, probably as consequence of me messing with permissions while trying to solve the problem alone, there's this:

```
store\data [domain]\[user]:(OI)(CI)(F)
           CCNT\Domain Admins:(I)(OI)(CI)(F)
           NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
           [domain]\[user]:(I)(OI)(CI)(M)

```

Yes, that's my username, twice. I may have violated some conventions when changing permissions... I'm okay with Posix permissions but this is a bit opaque to me.

A potential clue: It's quite possible that tortoisehg crashed before the problem appeared, or lost network connection. I was working with VPN from home, and that sort of thing can happen. So if Mercurial blocks any files/directories, there might be some block in place, though I wouldn't know how to verify/fix that. All machines which might have been responsible for blocking the dir have rebooted since the problem appeared -- except of course for the file server hosting the data.

I've also updated the statements above to add the `--debug` outputs. The random letters/numbers behind the filename changed, because I put some more changes into the file. That would indicate that it's really not that particular file (which does not exist anyway) but the directory which mercurial attempts to write into.