{"thread":{"id":"21453","subject":"Unhappy git in a jailshell?","startedAt":"2009-11-02T12:16:43Z","lastAt":"2009-11-04T01:17:03Z","messageCount":4,"participants":["Alex MDC","Dmitry Potapov","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"126580","messageId":"130714cd0911020416r6a686026q697d843f47b68692@mail.gmail.com","threadId":"21453","inReplyTo":null,"subject":"Unhappy git in a jailshell?","fromName":"Alex MDC","fromEmail":"alex.mdc@gmail.com","sentAt":"2009-11-02T12:16:43Z","receivedAt":"2009-11-02T12:16:43Z","isPatch":false,"sender":{"key":"alex.mdc@gmail.com","avatar":null},"body":"Hello,\n\nI'm trying to use git on a linux server, but unfortunately I've only\nbeen granted jailshelled access. Most of git works, but some commands\njust fail to run, e.g.\ngit repack\ngit rebase\ngit index-pack\n\nAll these commands fail with the error \"git: git-xxx is not a\ngit-command. See git --help\". However most other every-day commands\nwork just fine (add, status, commit...)\n\nI've been in contact with the server admins and they kindly upgraded\ngit to the latest 1.6.5.2 release but that didn't help. I enquired\nabout the contents of `git --exec-path` (as I don't have access from\nthe jailshell) and they said that all the \"missing\" commands are\npresent in that directory.\n\nI also tried \"git --help -all\" but that doesn't show any commands in\nthe output! In a way I'm wondering how it is working at all...\n\nSo I guess my question is, why are some commands working but not\nothers? If all commands are treated uniformly by using the command\nbinary from the libexec dir it would seem as though all commands\nshould work or all should be \"missing\".\n\nAlso, are they any ideas on how to get the missing commands to work?\n\nThanks for your help,\nAlex MDC\n"},{"id":"126583","messageId":"20091102124746.GA27126@dpotapov.dyndns.org","threadId":"21453","inReplyTo":"130714cd0911020416r6a686026q697d843f47b68692@mail.gmail.com","subject":"Re: Unhappy git in a jailshell?","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2009-11-02T12:47:46Z","receivedAt":"2009-11-02T12:47:46Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Mon, Nov 02, 2009 at 11:16:43PM +1100, Alex MDC wrote:\n> Hello,\n> \n> I'm trying to use git on a linux server, but unfortunately I've only\n> been granted jailshelled access. Most of git works, but some commands\n> just fail to run, e.g.\n> git repack\n> git rebase\n> git index-pack\n\nMost Git commands are builtin, so they are executed by git.exe directly,\nbut some commands are implemented as separate binaries or shell files.\nThese commands require `git --exec-path` in PATH to run. Normally, git\nadds `git --exec-path` in its environment before running them.\n\nApparently, jailshelled access prevents that somehow. So, I suggest you\ncontact your system administrator and tell him that you need to be able\nto run files from `git --exec-path` to being able to use git, as git\nneeds them internally for normal work.\n\n\nDmitry\n"},{"id":"126587","messageId":"4AEEE3D2.9040905@drmicha.warpmail.net","threadId":"21453","inReplyTo":"20091102124746.GA27126@dpotapov.dyndns.org","subject":"Re: Unhappy git in a jailshell?","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-11-02T13:51:14Z","receivedAt":"2009-11-02T13:51:14Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Dmitry Potapov venit, vidit, dixit 02.11.2009 13:47:\n> On Mon, Nov 02, 2009 at 11:16:43PM +1100, Alex MDC wrote:\n>> Hello,\n>>\n>> I'm trying to use git on a linux server, but unfortunately I've only\n>> been granted jailshelled access. Most of git works, but some commands\n>> just fail to run, e.g.\n>> git repack\n>> git rebase\n>> git index-pack\n> \n> Most Git commands are builtin, so they are executed by git.exe directly,\n> but some commands are implemented as separate binaries or shell files.\n> These commands require `git --exec-path` in PATH to run. Normally, git\n> adds `git --exec-path` in its environment before running them.\n> \n> Apparently, jailshelled access prevents that somehow. So, I suggest you\n> contact your system administrator and tell him that you need to be able\n> to run files from `git --exec-path` to being able to use git, as git\n> needs them internally for normal work.\n> \n\nCan you (Alex) find out whether you are allowed to run those binaries\nfrom that path directly? In that case we could rethink our strategy and\nadjust for the case where we can't set the environment.\n\nMichael\n"},{"id":"126697","messageId":"130714cd0911031717q7aa68a33wec501aec066d228d@mail.gmail.com","threadId":"21453","inReplyTo":"4AEEE3D2.9040905@drmicha.warpmail.net","subject":"Re: Unhappy git in a jailshell?","fromName":"Alex MDC","fromEmail":"alex.mdc@gmail.com","sentAt":"2009-11-04T01:17:03Z","receivedAt":"2009-11-04T01:17:03Z","isPatch":false,"sender":{"key":"alex.mdc@gmail.com","avatar":null},"body":"Hi guys,\n\nI requested the admins allow access to the `git --exec-path` directory\nfrom the jailshell and incredibly, they granted it! Now everything is\nworking and \"git --help --all\" lists all the commands as expected, so\nthat was indeed the problem.\n\nIt was just a bit deceiving at first that some git commands were\nworking but others weren't, but Dmitry explained that one.\n\nThanks for your help,\nAlex\n"}]}