File ownership and 'cannot stat' on W7

1,517 views
Skip to first unread message

turveysp

unread,
Feb 24, 2011, 5:19:13 AM2/24/11
to msysGit
Using: Git-1.7.4-preview20110204

A couple of times now I've seen an issue where adding a new directory
of files to git in one branch (a) and then switching to a branch where
those files do not yet exist (b) causes the following error when then
switching back to (a) again:

error: cannot stat 'qml/uif/img': Permission denied

Where the uif/* files are the ones that have been added in (a). The
error is issued many times, presumably once for each file in the
directory.

Look at the file ownership in Windows Explorer it seems that some
directory entries end up without an owner and not even an
Administrator user can re-own them once they're in that state. When
this happens I end up having to boot into safe mode and nuking the
entire folder before re-cloning.

Has anyone else seen this issue? I've experienced it on several
machines and colleagues have seen it also.

Simon.

turveysp

unread,
Mar 1, 2011, 5:05:16 AM3/1/11
to msysGit
Raising as a defect then. I'll try and set up a repro scenario.

HH

unread,
Mar 22, 2011, 6:24:30 AM3/22/11
to msysGit
On Feb 24, 12:19 pm, turveysp <simon.tur...@gmail.com> wrote:
> Has anyone else seen this issue? I've experienced it on several
> machines and colleagues have seen it also.

I'm having similar problems currently as well. This issue is making
development quite hard at the moment, and thus I'd appreciate seeing a
fix/workaround for this as soon as possible. I'm working with Windows
7 and msysgit 1.7.4 preview as well.

I'm able to get rid of the locked directories just via rebooting
Windows and deleting directories normally after that, which might make
this bug even more interesting.


Br,

Harri

chni...@gmail.com

unread,
May 11, 2011, 12:52:23 PM5/11/11
to msy...@googlegroups.com
Having the same issue.  Not sure what is causing it, but I find it goes away after closing Visual Studio.  That said, I think the problem is more complicated than just VS locking files.

Bradley Holbrook

unread,
May 17, 2011, 12:10:50 PM5/17/11
to msy...@googlegroups.com
Ran into the same issue.
Simply closing the program that edits those files will release them.

Unsure what actually causes this but it seems to be a permissions
issue between the editing problem, the file, and git.

Henrik Gedionsen

unread,
Jul 3, 2013, 3:09:21 AM7/3/13
to msy...@googlegroups.com
Same issue here, fixed with IIS reset.
Guess that the website had the folder locked.

Jon Thor Austen

unread,
Feb 1, 2016, 7:28:47 PM2/1/16
to Git for Windows
Something similar to this happens to me using "Git for Windows 2.5.0.windows.1" on WIndows 7.   The problem ONLY occurs when I have a scripted "git merge --no-ff BranchName" command that is executed in a "Git Bash" prompt from a Bash script.    Just putting the info here in case it helps reproduce the issue for someone.
Reply all
Reply to author
Forward
0 new messages