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

[BUG] Directory probing for aliases

From
VYVasiliy Yeremeyev <vayerx@gmail.com>
Date
Oct 11, 2012, 10:22 UTC
Message-ID
<CAFKeBpcCZwMMcBtP8KywqnyK3e247K1Z_8na5ah+Wb+E15LPVQ@mail.gmail.com>

Hi, Git aliases stop working when user doesn't have permissions to any directory within $PATH list:

% git config alias.br branch % git br fatal: cannot exec 'git-br': Permission denied

Problem seems to be in directories probing:

execve("/usr/libexec/git-core/git-br", ["git-br"], [/* 76 vars */]) = -1 ENOENT (No such file or directory) execve("/home/vayerx/bin/git-br", ["git-br"], [/* 76 vars */]) = -1 ENOENT (No such file or directory) execve("/usr/local/bin/git-br", ["git-br"], [/* 76 vars */]) = -1 ENOENT (No such file or directory) execve("/usr/bin/git-br", ["git-br"], [/* 76 vars */]) = -1 ENOENT (No such file or directory) execve("/bin/git-br", ["git-br"], [/* 76 vars */]) = -1 ENOENT (No such file or directory) execve("/opt/bin/git-br", ["git-br"], [/* 76 vars */]) = -1 ENOENT (No such file or directory) execve("/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3/git-br", ["git-br"], [/* 76 vars */]) = -1 ENOENT (No such file or directory) execve("/usr/games/bin/git-br", ["git-br"], [/* 76 vars */]) = -1 EACCES (Permission denied) write(2, "fatal: ", 7fatal: ) = 7 write(2, "cannot exec 'git-br': Permission"..., 39cannot exec 'git-br': Permission denied) = 39

(user doesn't have access to '/usr/games/bin' directory) Everything works fine if '/usr/games/bin' is not listed in $PATH variable. Standard/built-in git commands work fine regardless of $PATH variable.

-- 
With Best Regards,
Vasiliy Yeremeyev
Next: Andreas Schwab
Message 1 of 2 in “[BUG] Directory probing for aliases”
  1. Vasiliy YeremeyevOct 11, 2012
  2. Andreas SchwabOct 11, 2012

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.