git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Commit templates are not readable after 'make install'

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 9, 2008, 19:19 UTC
Message-ID
<7v8wu16sbc.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<3665a1a00809091202u295fedabl53b280aad7bedb62@mail.gmail.com>
"Anatol Pomozov" <anatol.pomozov@gmail.com> writes:
Show 25 quoted lines
> I build git from sources and I have one small permissions issue that
> (I think) should be fixed.
>
> So I build it as described in INSTALL file
> make prefix=/usr all
> sudo make prefix=/usr install
>
> Everything goes fine here and we have a new version of git installed
> $ git --version
> git version 1.6.0.1.285.g1070
>
> But when I want to create a new repo, I have a fatal problem
> $ git init
> fatal: cannot copy
> /usr/share/git-core/templates/hooks/applypatch-msg.sample to
> /personal/sources/opensource/1/.git/hooks/applypatch-msg.sample
>
>
> Because of the template files are readable only for root
> $ ls -l /usr/share/git-core/templates/hooks/
> total 44
> -rwxr-x--- 1 root root  452 2008-08-29 11:04 applypatch-msg.sample
> -rwxr-x--- 1 root root  894 2008-08-29 11:04 commit-msg.sample
> -rwxr-x--- 1 root root  160 2008-08-29 11:04 post-commit.sample
> -rwxr-x--- 1 root root  553 2008-08-29 11:04 post-receive.sample

Didn't 9907721 (templates/Makefile: don't depend on local umask setting, 2008-02-28) take care of that?

    ... goes and looks ...
Ah, that is only to propagate the wish of the person who _built_ it.

You probably have a tight umask and have sources checked out unreadable to others, which is propagated to the installation (check the permission of files in your templates/blt directory to verify this conjecture). And the build procedure is honoring your wish to make things unreadable to others.

Previous: Anatol PomozovNext: Junio C Hamano
Message 2 of 6 in “Commit templates are not readable after 'make install'”
  1. Anatol PomozovSep 9, 2008
  2. Junio C HamanoSep 9, 2008
  3. Junio C HamanoSep 9, 2008
  4. Johannes SixtSep 10, 2008
  5. Junio C HamanoSep 10, 2008
  6. Anatol PomozovSep 11, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.