| Summary: | dev-vcs/git-1.8.1.5 - init.d script fails to start git-daemon: unable to access '/root/.config/git/config': Permission denied | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Timo Rothenpieler <timo> |
| Component: | [OLD] Development | Assignee: | Robin Johnson <robbat2> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | CC: | hakan, mail, mattst88, staff |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| URL: | http://www.spinics.net/lists/git/msg209279.html | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | patch to work around the issue | ||
|
Description
Timo Rothenpieler
2013-05-03 20:20:11 UTC
Confirmed. It's broken, but known and fixed in master. The commit (4698c8f) is not in any released version, nor in any tag currently in git's repo. Stable git (1.8.1.5) daemon cannot serve repos as the git user. Temporary work-around: add HOME=/var/git before start-stop-daemon ... in /etc/init.d/git-daemon. If i got that right, the upstream "fix" is to silently ignore EACCESS error when reading config files. The real problem, that the --user/--group options don't fully change the user(they obviously at least don't change HOME) and are quite useless this way. Noone usualy changes $HOME before running a daemon which changes the user. Just ignoring any configs in case of --user change can't be right. The only real fix i see for this is to not use --user/--group at all, and instead use start-stop-daemon to change the user and write the pidfile. Out of curiosity... start-stop-daemon has the --env option which could be of help here (see "man start-stop-daemon"). Did anyone test this? any updates on this issue? Created attachment 362974 [details, diff]
patch to work around the issue
This simply sets HOME to empty, allowing the git-daemon to work correctly.
this doesn't happen anymore with latest versions of git (>1.8.3) *** This bug has been marked as a duplicate of bug 460370 *** |