# unable to index file UsrClass.dat

3 messages from 2012-06-18 to 2012-06-18. Participants: Grant Zhao, Carlos Martín Nieto, Ben Walton.
Thread: https://gitlist.dev/t/30830

## Grant Zhao, 2012-06-18 10:09

Subject: unable to index file UsrClass.dat
Message-ID: <CACUgyLmvWk0WeMqx-7Qkw0py8=1ND+4pZNJDp5JOYxEcjU-UXQ@mail.gmail.com>
URL: https://gitlist.dev/e/CACUgyLmvWk0WeMqx-7Qkw0py8%3D1ND%2B4pZNJDp5JOYxEcjU-UXQ%40mail.gmail.com

```
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, 2012-06-18 13:11

Subject: Re: unable to index file UsrClass.dat
Message-ID: <1340025010-sup-6406@pinkfloyd.chass.utoronto.ca>
URL: https://gitlist.dev/e/1340025010-sup-6406%40pinkfloyd.chass.utoronto.ca
In-Reply-To: <CACUgyLmvWk0WeMqx-7Qkw0py8=1ND+4pZNJDp5JOYxEcjU-UXQ@mail.gmail.com>

```
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, 2012-06-18 13:49

Subject: Re: unable to index file UsrClass.dat
Message-ID: <1340027389.10106.18.camel@beez.lab.cmartin.tk>
URL: https://gitlist.dev/e/1340027389.10106.18.camel%40beez.lab.cmartin.tk
In-Reply-To: <CACUgyLmvWk0WeMqx-7Qkw0py8=1ND+4pZNJDp5JOYxEcjU-UXQ@mail.gmail.com>

```
On Mon, 2012-06-18 at 03:09 -0700, Grant Zhao wrote:
> 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


```
