# problem with file mode

6 messages from 2009-06-08 to 2009-06-08. Participants: Andrew Romanenco, Jeff King, Johannes Sixt.
Thread: https://gitlist.dev/t/19741

## Andrew Romanenco, 2009-06-08 09:09

Subject: problem with file mode
Message-ID: <18e14dc30906080209m9eceb6ft81c77ea0345b30e3@mail.gmail.com>
URL: https://gitlist.dev/e/18e14dc30906080209m9eceb6ft81c77ea0345b30e3%40mail.gmail.com

```
Hello

I have problem with cloning git repo

Both stations are ubuntu 8.10
And I have repo with text files on station A
When I do git clone to station B all files become executable 755
And git status show that all files are modified, diff shows mode change

could you help me with this issue?

thanks
Andrew

```

## Jeff King, 2009-06-08 12:30

Subject: Re: problem with file mode
Message-ID: <20090608123006.GF13775@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20090608123006.GF13775%40coredump.intra.peff.net
In-Reply-To: <18e14dc30906080209m9eceb6ft81c77ea0345b30e3@mail.gmail.com>

```
On Mon, Jun 08, 2009 at 12:09:23PM +0300, Andrew Romanenco wrote:

> Both stations are ubuntu 8.10
> And I have repo with text files on station A
> When I do git clone to station B all files become executable 755
> And git status show that all files are modified, diff shows mode change

What filesystem is station B running? Is it something that actually has
a proper executable bit (i.e., not FAT or similar)?

-Peff

```

## Andrew Romanenco, 2009-06-08 13:49

Subject: Re: problem with file mode
Message-ID: <18e14dc30906080649y2efa7facv1109fcd797614d27@mail.gmail.com>
URL: https://gitlist.dev/e/18e14dc30906080649y2efa7facv1109fcd797614d27%40mail.gmail.com
In-Reply-To: <20090608123006.GF13775@coredump.intra.peff.net>

```
true - B is Fat

On Mon, Jun 8, 2009 at 3:30 PM, Jeff King<peff@peff.net> wrote:
> On Mon, Jun 08, 2009 at 12:09:23PM +0300, Andrew Romanenco wrote:
>
>> Both stations are ubuntu 8.10
>> And I have repo with text files on station A
>> When I do git clone to station B all files become executable 755
>> And git status show that all files are modified, diff shows mode change
>
> What filesystem is station B running? Is it something that actually has
> a proper executable bit (i.e., not FAT or similar)?
>
> -Peff
>



-- 
Best regards,
Andrew Romanenco

        Software developer
        Microsoft Certified Professional (win2k)
        Microsoft Certified Database Administrator
        Sun Certified Java Programmer
        Sun Certified Web Component Developer
        Oracle Database 10g Administrator Certified Associate

        mailto:andrew@romanenco.com
        http://www.romanenco.com

```

## Jeff King, 2009-06-08 13:57

Subject: Re: problem with file mode
Message-ID: <20090608135709.GC28101@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20090608135709.GC28101%40sigill.intra.peff.net
In-Reply-To: <18e14dc30906080649y2efa7facv1109fcd797614d27@mail.gmail.com>

```
On Mon, Jun 08, 2009 at 04:49:44PM +0300, Andrew Romanenco wrote:

> true - B is Fat

Then you probably want to:

  git config core.filemode false

on B. Though I thought we automagically tested whether the filesystem
supported executable bits when creating the repository. Did you create
the repository on a different filesystem and then move it to FAT, or did
you directly clone to FAT?

-Peff

```

## Andrew Romanenco, 2009-06-08 14:08

Subject: Re: problem with file mode
Message-ID: <18e14dc30906080708x77933794r1260c3bd6954700e@mail.gmail.com>
URL: https://gitlist.dev/e/18e14dc30906080708x77933794r1260c3bd6954700e%40mail.gmail.com
In-Reply-To: <20090608135709.GC28101@sigill.intra.peff.net>

```
I have create repo on ext3 and cloned it to fat

thak you for your help

On Mon, Jun 8, 2009 at 4:57 PM, Jeff King<peff@peff.net> wrote:
> On Mon, Jun 08, 2009 at 04:49:44PM +0300, Andrew Romanenco wrote:
>
>> true - B is Fat
>
> Then you probably want to:
>
>  git config core.filemode false
>
> on B. Though I thought we automagically tested whether the filesystem
> supported executable bits when creating the repository. Did you create
> the repository on a different filesystem and then move it to FAT, or did
> you directly clone to FAT?
>
> -Peff
>



-- 
Best regards,
Andrew Romanenco

        Software developer
        Microsoft Certified Professional (win2k)
        Microsoft Certified Database Administrator
        Sun Certified Java Programmer
        Sun Certified Web Component Developer
        Oracle Database 10g Administrator Certified Associate

        mailto:andrew@romanenco.com
        http://www.romanenco.com

```

## Johannes Sixt, 2009-06-08 14:50

Subject: Re: problem with file mode
Message-ID: <4A2D251E.9030305@viscovery.net>
URL: https://gitlist.dev/e/4A2D251E.9030305%40viscovery.net
In-Reply-To: <20090608135709.GC28101@sigill.intra.peff.net>

```
Jeff King schrieb:
> On Mon, Jun 08, 2009 at 04:49:44PM +0300, Andrew Romanenco wrote:
>> true - B is Fat
> 
> Then you probably want to:
> 
>   git config core.filemode false
> 
> on B. Though I thought we automagically tested whether the filesystem
> supported executable bits when creating the repository.

We do. Our test basically:

   lstat()
   chmod(st_mode ^ S_IXUSR)
   lstat()

but Linux (Andrew said he's on Ubuntu) keeps the mode bits that user-space
requested with chmod() in the cache long enough that the subsequent
lstat() call sees what it just requested. So, our test doesn't notice that
the x-bit is not written to the filesystem.

:-(

-- Hannes

```
