{"thread":{"id":"21544","subject":"get git not to care about permissions","startedAt":"2009-11-09T16:06:38Z","lastAt":"2009-11-15T12:31:33Z","messageCount":8,"participants":["sconeman","Jay Soffian","Eugene Sajine","Matt Schoen","Thomas Rast"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"127168","messageId":"26268938.post@talk.nabble.com","threadId":"21544","inReplyTo":null,"subject":"get git not to care about permissions","fromName":"sconeman","fromEmail":"schoen@bu.edu","sentAt":"2009-11-09T16:06:38Z","receivedAt":"2009-11-09T16:06:38Z","isPatch":false,"sender":{"key":"schoen@bu.edu","avatar":null},"body":"\nHello,\n\nI'm trying to set up git on a NetApp drive at my school, BU.  The NetApp\nshares are configured with Windows permissions, and I forget the specifics\n(which I can figure out if needed) about why this is the case, but basically\nthe deal is that if true UNIX permissions were to be used, Windows wouldn't\nbe able to read the drive.  As such, and because we use the Kerberos\nticketing system, the permissions for the drive are set up such that the\nowners (myself and my team members) have full permissions, but nobody else\ndoes.  Git doesn't like this and won't even create a bare repository.  Is\nthere any way I can get git to ignore permissions and just do what it needs\nto do?\n\nThanks in advance for the help!\n\n-Matt\n-- \nView this message in context: http://old.nabble.com/get-git-not-to-care-about-permissions-tp26268938p26268938.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"127413","messageId":"76718490911112144n6837d02cw94d608bcbc74855a@mail.gmail.com","threadId":"21544","inReplyTo":"26268938.post@talk.nabble.com","subject":"Re: get git not to care about permissions","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2009-11-12T05:44:08Z","receivedAt":"2009-11-12T05:44:08Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Wed, Nov 11, 2009 at 4:17 PM, sconeman <schoen@bu.edu> wrote:\n> does.  Git doesn't like this and won't even create a bare repository.  Is\n> there any way I can get git to ignore permissions and just do what it needs\n> to do?\n\nAnd the output from \"git init --bare\" is?\n\nj.\n"},{"id":"127449","messageId":"76c5b8580911120728j2f9995basb554b0a493a364bf@mail.gmail.com","threadId":"21544","inReplyTo":"76c5b8580911111334p76232995qbd6bf6b06d250854@mail.gmail.com","subject":"Re: get git not to care about permissions","fromName":"Eugene Sajine","fromEmail":"euguess@gmail.com","sentAt":"2009-11-12T15:28:57Z","receivedAt":"2009-11-12T15:28:57Z","isPatch":false,"sender":{"key":"euguess@gmail.com","avatar":null},"body":">>\n>> On Nov 9, 2009 11:06 AM, \"sconeman\" <schoen@bu.edu> wrote:\n>>\n>>\n>> Hello,\n>>\n>> I'm trying to set up git on a NetApp drive at my school, BU.  The NetApp\n>> shares are configured with Windows permissions, and I forget the specifics\n>> (which I can figure out if needed) about why this is the case, but basically\n>> the deal is that if true UNIX permissions were to be used, Windows wouldn't\n>> be able to read the drive.  As such, and because we use the Kerberos\n>> ticketing system, the permissions for the drive are set up such that the\n>> owners (myself and my team members) have full permissions, but nobody else\n>> does.  Git doesn't like this and won't even create a bare repository.  Is\n>> there any way I can get git to ignore permissions and just do what it needs\n>> to do?\n>>\n>> Thanks in advance for the help!\n>>\n>> -Matt\n> --\nOn Wed, Nov 11, 2009 at 4:34 PM, Eugene Sajine <euguess@gmail.com> wrote:\n> Hi,\n>\n> I had almost similar issue - bare repos in my case should be set up under\n> user which only few guys are having password from. So what I did is just a\n> small program which creates the bare repo locally and makes secure copy to\n> this user home. All authentication is hidden from the end user. Then users\n> can access their repos via git protocol. Ialso fillthe repo with some\n> additional info for cgit.\n>\n> Eugene\n\nBTW I'm using \"git clone --bare\" in this process, so if you have a\nrepo with working copy you can create a bare one separately, put it on\nthe server and then connect to it via \"git remote add\"\n\nEugene\n"},{"id":"127452","messageId":"3cf217d80911120744g5e020003rc00c460fff0bff1d@mail.gmail.com","threadId":"21544","inReplyTo":"76718490911112144n6837d02cw94d608bcbc74855a@mail.gmail.com","subject":"Re: get git not to care about permissions","fromName":"Matt Schoen","fromEmail":"mtschoen@gmail.com","sentAt":"2009-11-12T15:44:50Z","receivedAt":"2009-11-12T15:44:50Z","isPatch":false,"sender":{"key":"mtschoen@gmail.com","avatar":null},"body":"The only output I get is:\n\nwarning: templates not found /tmp/git/share/git-core/templates\nerror: Unable to open\n/ad/eng/courses/ec/ec464/ec464-team03/test.git/HEAD.lock for writing\n\nls -al in the directory gives me:\ntotal 12\ndrwx------ 3 schoen root 4096 Nov 12 10:41 .\nd--------- 7 root   root 4096 Nov 12 10:41 ..\n-rwx------ 1 schoen root    0 Nov 12 10:41 HEAD.lock\ndrwx------ 4 schoen root 4096 Nov 12 10:41 refs\n\nAs I understand it, because we use Kerberos, permissions on everything\nmust be set to 700 at most.  I think the issue here comes from the\nfact that git wants to use group permissions.  This is my guess.\n\nOn Thu, Nov 12, 2009 at 12:44 AM, Jay Soffian <jaysoffian@gmail.com> wrote:\n> On Wed, Nov 11, 2009 at 4:17 PM, sconeman <schoen@bu.edu> wrote:\n>> does.  Git doesn't like this and won't even create a bare repository.  Is\n>> there any way I can get git to ignore permissions and just do what it needs\n>> to do?\n>\n> And the output from \"git init --bare\" is?\n>\n> j.\n>\n>\n"},{"id":"127451","messageId":"3cf217d80911120747k116d3747g75dc60f17e00127@mail.gmail.com","threadId":"21544","inReplyTo":"76c5b8580911120728j2f9995basb554b0a493a364bf@mail.gmail.com","subject":"Re: get git not to care about permissions","fromName":"Matt Schoen","fromEmail":"mtschoen@gmail.com","sentAt":"2009-11-12T15:47:30Z","receivedAt":"2009-11-12T15:47:30Z","isPatch":false,"sender":{"key":"mtschoen@gmail.com","avatar":null},"body":"Thanks for the tip, Eugene, but I'm not sure if this helps me.\n\nI'm trying to set up the repo on a shared directory, which isn't\nactually on a physical computer (NetApp is basically a\ndata-server-in-a-box, and as such I do not directly interface with\nit).  Thus, I must access the directory over the school network, which\nuses Kerberos security.  I think it is this restriction that is giving\ngit its issues.\n\nOn Thu, Nov 12, 2009 at 10:28 AM, Eugene Sajine <euguess@gmail.com> wrote:\n>>>\n>>> On Nov 9, 2009 11:06 AM, \"sconeman\" <schoen@bu.edu> wrote:\n>>>\n>>>\n>>> Hello,\n>>>\n>>> I'm trying to set up git on a NetApp drive at my school, BU.  The NetApp\n>>> shares are configured with Windows permissions, and I forget the specifics\n>>> (which I can figure out if needed) about why this is the case, but basically\n>>> the deal is that if true UNIX permissions were to be used, Windows wouldn't\n>>> be able to read the drive.  As such, and because we use the Kerberos\n>>> ticketing system, the permissions for the drive are set up such that the\n>>> owners (myself and my team members) have full permissions, but nobody else\n>>> does.  Git doesn't like this and won't even create a bare repository.  Is\n>>> there any way I can get git to ignore permissions and just do what it needs\n>>> to do?\n>>>\n>>> Thanks in advance for the help!\n>>>\n>>> -Matt\n>> --\n> On Wed, Nov 11, 2009 at 4:34 PM, Eugene Sajine <euguess@gmail.com> wrote:\n>> Hi,\n>>\n>> I had almost similar issue - bare repos in my case should be set up under\n>> user which only few guys are having password from. So what I did is just a\n>> small program which creates the bare repo locally and makes secure copy to\n>> this user home. All authentication is hidden from the end user. Then users\n>> can access their repos via git protocol. Ialso fillthe repo with some\n>> additional info for cgit.\n>>\n>> Eugene\n>\n> BTW I'm using \"git clone --bare\" in this process, so if you have a\n> repo with working copy you can create a bare one separately, put it on\n> the server and then connect to it via \"git remote add\"\n>\n> Eugene\n>\n>\n"},{"id":"127454","messageId":"200911121710.44314.trast@student.ethz.ch","threadId":"21544","inReplyTo":"3cf217d80911120744g5e020003rc00c460fff0bff1d@mail.gmail.com","subject":"Re: get git not to care about permissions","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-11-12T16:10:43Z","receivedAt":"2009-11-12T16:10:43Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Matt Schoen wrote:\n> error: Unable to open\n> /ad/eng/courses/ec/ec464/ec464-team03/test.git/HEAD.lock for writing\n> \n> ls -al in the directory gives me:\n> total 12\n> drwx------ 3 schoen root 4096 Nov 12 10:41 .\n> d--------- 7 root   root 4096 Nov 12 10:41 ..\n> -rwx------ 1 schoen root    0 Nov 12 10:41 HEAD.lock\n\nAt least in my current copy, this can only come from\n\n\t// lock.c:1371\n\tlockpath = mkpath(\"%s.lock\", git_HEAD);\n\tfd = open(lockpath, O_CREAT | O_EXCL | O_WRONLY, 0666);\n\tif (fd < 0) {\n\t\terror(\"Unable to open %s for writing\", lockpath);\n\nIt prints an absolute path, so the open() also accesses an absolute\npath (though I don't know why it insists on that).\n\nBut the above directory listing would indicate that you do not even\nhave permission to look inside your $(pwd) by absolute path...\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"127475","messageId":"3cf217d80911121344w7d1809ebs103eaa2ac19a03a6@mail.gmail.com","threadId":"21544","inReplyTo":"200911121710.44314.trast@student.ethz.ch","subject":"Re: get git not to care about permissions","fromName":"Matt Schoen","fromEmail":"mtschoen@gmail.com","sentAt":"2009-11-12T21:44:29Z","receivedAt":"2009-11-12T21:44:29Z","isPatch":false,"sender":{"key":"mtschoen@gmail.com","avatar":null},"body":"On Thu, Nov 12, 2009 at 11:10 AM, Thomas Rast <trast@student.ethz.ch> wrote:\n> It prints an absolute path, so the open() also accesses an absolute\n> path (though I don't know why it insists on that).\n>\n> But the above directory listing would indicate that you do not even\n> have permission to look inside your $(pwd) by absolute path...\n\nI'm pretty sure I can.  How can I test this?  I can ls all\nsubdirectories within the path, and when I navigate to the path, I\nusually do it absolutely.  After all, this is a network share, so I\nhave to start with \"/ad/eng/...\".  Although, this is curious.  Some of\nthe directories show \"d---------\" when I do ls -al.  They were created\nby root in the same environment (forced 700), but I can still read\ntheir contents, and such.\n\nDoes open() strictly require the permissions you give it?  Like I\nmentioned, the permissions are locked at 700.  Even if I try to chmod\n777 the directory, I see no error, but the permissions remain\nunchanged.  I'm thinking of doing a custom compile, removing those\nplaces where specific permissions are needed.  My fear is that those\nplaces are many...\n"},{"id":"127607","messageId":"200911151331.35787.trast@student.ethz.ch","threadId":"21544","inReplyTo":"3cf217d80911121344w7d1809ebs103eaa2ac19a03a6@mail.gmail.com","subject":"Re: get git not to care about permissions","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-11-15T12:31:33Z","receivedAt":"2009-11-15T12:31:33Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Matt Schoen wrote:\n> On Thu, Nov 12, 2009 at 11:10 AM, Thomas Rast <trast@student.ethz.ch> wrote:\n> > It prints an absolute path, so the open() also accesses an absolute\n> > path (though I don't know why it insists on that).\n> >\n> > But the above directory listing would indicate that you do not even\n> > have permission to look inside your $(pwd) by absolute path...\n> \n> I'm pretty sure I can.  How can I test this?  I can ls all\n> subdirectories within the path, and when I navigate to the path, I\n> usually do it absolutely.  After all, this is a network share, so I\n> have to start with \"/ad/eng/...\".  Although, this is curious.  Some of\n> the directories show \"d---------\" when I do ls -al.  They were created\n> by root in the same environment (forced 700), but I can still read\n> their contents, and such.\n\nWhat filesystem is this?  Are there perhaps extended attributes\nallowing access anyway?  I'm not exactly an expert on unix permissions\nbut my local path_resolution(7) tells me it should not be possible to\ncd beyond a directory where you have no 'x' permissions.\n\n> Does open() strictly require the permissions you give it?\n\nopen(2) says the permissions are modified by the umask, so that\nshouldn't be a problem.\n\n\nQuestion for the people who know git better than me:  Does that open()\nrequire an absolute path?\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"}]}