threads / discuss / 30830

unable to index file UsrClass.dat

Subject: unable to index file UsrClass.dat

## tl;dr

3 messages between Jun 18, 2012 and Jun 18, 2012.

replies: 2people: 3as markdown or json

Grant Zhao· Jun 18, 2012, 10:09 UTC · lore

I used "git add .",but "fatal: adding files failed". because

error: open("Local Settings/Application Data/Microsoft/Windows/UsrClass.dat"): P ermission denied

I cannot open the file "UsrClass.dat",I use Windows XP Profesional Sp3, please tell me why!

thank you!
Grant
Welcome to msysGit

Run 'git help git' to display the help index. Run 'git help <command>' to display help for specific commands. Run '/share/msysGit/add-shortcut.tcl' to add a shortcut to msysGit.

Administrator@TITIAN12508391 ~/Documents and Settings/Monica (master) $ git init Reinitialized existing Git repository in C:/Documents and Settings/Monica/.git/

Administrator@TITIAN12508391 ~/Documents and Settings/Monica (master) $ git add . error: open("Local Settings/Application Data/Microsoft/Windows/UsrClass.dat"): P ermission denied error: unable to index file Local Settings/Application Data/Microsoft/Windows/Us rClass.dat fatal: adding files failed

Administrator@TITIAN12508391 ~/Documents and Settings/Monica (master) $

Ben Walton· Jun 18, 2012, 13:11 UTC · re: Grant Zhao · lore

Re: unable to index file UsrClass.dat

Excerpts from Grant Zhao's message of Mon Jun 18 06:09:08 -0400 2012:
Hi Grant,
> I cannot open the file "UsrClass.dat",I use Windows XP Profesional
> Sp3, please tell me why!

Because windows has this file open and locked. The locking model prevents concurrent access. The only time you could add that file to git would be when you're logged out and doing it as another user[1].

Thanks -Ben

[1] Or have tricks that can read inside a shadow copy but that's a
    whole can of worms I won't get in to.
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302
Carlos Martín Nieto· Jun 18, 2012, 13:49 UTC · re: Grant Zhao · lore

Re: unable to index file UsrClass.dat

On Mon, 2012-06-18 at 03:09 -0700, Grant Zhao wrote:
Show 8 quoted lines
> I used "git add .",but "fatal: adding files failed".
> because
> 
> error: open("Local Settings/Application Data/Microsoft/Windows/UsrClass.dat"): P
> ermission denied
> 
> I cannot open the file "UsrClass.dat",I use Windows XP Profesional
> Sp3, please tell me why!

Did you miss the part where is says "Permission denied"? You even quoted it in the e-mail.

As to why you don't have permission to read the file, that shouldn't be related to git at all. It looks like you're trying to read someone else's data, which would certainly account for the lack of permissions.

   cmn

← back to recent threads