{"thread":{"id":"27607","subject":"file mode","startedAt":"2011-06-12T18:57:14Z","lastAt":"2011-06-14T06:00:34Z","messageCount":9,"participants":["Peter Kleiweg","Michael Witten","Jeff King","Dirk Süsserott","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"169898","messageId":"alpine.DEB.1.10.1106122055210.6124@localhost","threadId":"27607","inReplyTo":null,"subject":"file mode","fromName":"Peter Kleiweg","fromEmail":"pkleiweg@xs4all.nl","sentAt":"2011-06-12T18:57:14Z","receivedAt":"2011-06-12T18:57:14Z","isPatch":false,"sender":{"key":"pkleiweg@xs4all.nl","avatar":"https://gravatar.com/avatar/0d4b65b8b9262c0f6e91c618dbde9a639c46ac2e53c1374fafd448bbfd913979?d=mp&s=160"},"body":"\nI added a file that has file mode 600. When I do a check-out, \nthe file comes with mode 644. Is this supposed to happen? Then \nhow do I control what permissions files have?\n\n\n-- \nPeter Kleiweg\nhttp://pkleiweg.home.xs4all.nl/\n"},{"id":"169899","messageId":"BANLkTimh=-caLH5dVaUeXXmcF21+=-o0tw@mail.gmail.com","threadId":"27607","inReplyTo":"alpine.DEB.1.10.1106122055210.6124@localhost","subject":"Re: file mode","fromName":"Michael Witten","fromEmail":"mfwitten@gmail.com","sentAt":"2011-06-12T19:12:42Z","receivedAt":"2011-06-12T19:12:42Z","isPatch":false,"sender":{"key":"mfwitten@gmail.com","avatar":"https://avatars.githubusercontent.com/u/597101?v=4"},"body":"On Sun, Jun 12, 2011 at 18:57, Peter Kleiweg <pkleiweg@xs4all.nl> wrote:\n> I added a file that has file mode 600. When I do a check-out,\n> the file comes with mode 644. Is this supposed to happen? Then\n> how do I control what permissions files have?\n\nDo some googling.\n"},{"id":"169919","messageId":"20110613053814.GA2680@sigill.intra.peff.net","threadId":"27607","inReplyTo":"BANLkTimh=-caLH5dVaUeXXmcF21+=-o0tw@mail.gmail.com","subject":"Re: file mode","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-06-13T05:38:14Z","receivedAt":"2011-06-13T05:38:14Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Jun 12, 2011 at 07:12:42PM +0000, Michael Witten wrote:\n\n> On Sun, Jun 12, 2011 at 18:57, Peter Kleiweg <pkleiweg@xs4all.nl> wrote:\n> > I added a file that has file mode 600. When I do a check-out,\n> > the file comes with mode 644. Is this supposed to happen? Then\n> > how do I control what permissions files have?\n> \n> Do some googling.\n\nI really don't see the point of a response like this. It is one thing to\nrudely point somebody to lmgtfy or an FAQ link. Then you're still being\nrude, but at least you are pointing them in the right direction. But\nthis seems simply to make the list a less pleasant place _and_ to be\ntotally useless to the original poster. If you didn't want to give the\nanswer, wouldn't it have been better not to respond at all?\n\nPeter:\n\nThis is by design. While the git data structure can technically store\nunix mode bits in its trees, it was found early on in git's history that\nrespecting anything beyond a simple executable bit ended up being more\ncumbersome for git's normal use cases (i.e., people storing code or\nother shared files in a repository).\n\nWe could add in a config option to respect file modes, but it has\ngenerally been seen as not worthwhile. It solves only a part of the\ngeneral metadata problem, as it omits owner and group names or ids, as\nwell as extended metadata like ACLs.\n\nIf modes are important to you, the suggested fixes are one of:\n\n  1. Use a tool like \"metastore\" that can be called from git hooks, and\n     will save and restore file permissions in a file that is tracked in\n     the repository. Do note that when using such a tool there is a race\n     condition in protecting files (i.e., git will create your file as\n     644, and then metastore will correct it to 600; in the meantime,\n     somebody could read your file).\n\n  2. Depending on exactly what you're storing, it may make sense to keep\n     your repository in another directory, protected by permissions, and\n     then use a separate tool to deploy your files from the repository\n     to their ultimate location (e.g., a Makefile or other install\n     tool).\n\n-Peff\n\nPS I actually _did_ try googling for this, and didn't come up with an\nanswer that was as complete or clear (to me, anyway) as what I wrote\nabove.\n"},{"id":"169938","messageId":"4DF61634.7020003@dirk.my1.cc","threadId":"27607","inReplyTo":"20110613053814.GA2680@sigill.intra.peff.net","subject":"Re: file mode","fromName":"Dirk Süsserott","fromEmail":"newsletter@dirk.my1.cc","sentAt":"2011-06-13T13:52:52Z","receivedAt":"2011-06-13T13:52:52Z","isPatch":false,"sender":{"key":"newsletter@dirk.my1.cc","avatar":null},"body":"Am 13.06.2011 07:38 schrieb Jeff King:\n> On Sun, Jun 12, 2011 at 07:12:42PM +0000, Michael Witten wrote:\n> \n>> On Sun, Jun 12, 2011 at 18:57, Peter Kleiweg <pkleiweg@xs4all.nl> wrote:\n>>> I added a file that has file mode 600. When I do a check-out,\n>>> the file comes with mode 644. Is this supposed to happen? Then\n>>> how do I control what permissions files have?\n>>\n>> Do some googling.\n> \n> I really don't see the point of a response like this. It is one thing to\n> rudely point somebody to lmgtfy or an FAQ link. Then you're still being\n> rude, but at least you are pointing them in the right direction. But\n> this seems simply to make the list a less pleasant place _and_ to be\n> totally useless to the original poster. If you didn't want to give the\n> answer, wouldn't it have been better not to respond at all?\n> \n\nMy sentiments exactly. Actually this list is one of the best I ever met\nor subscribed to. Even posts with the meaningless subject \"Help needed\"\nare answered. I've seen some of them. Few, though. Please, people, stick\nto what Peff suggests. I think for most newbees this list is the last\neffort AFTER googling, so googling won't help.\n\nCheers,\n\tDirk\n"},{"id":"169939","messageId":"BANLkTikZZsuQ9PoNvMOoRCg=kAnwQOvOSQ@mail.gmail.com","threadId":"27607","inReplyTo":"20110613053814.GA2680@sigill.intra.peff.net","subject":"Re: file mode","fromName":"Michael Witten","fromEmail":"mfwitten@gmail.com","sentAt":"2011-06-13T13:58:17Z","receivedAt":"2011-06-13T13:58:17Z","isPatch":false,"sender":{"key":"mfwitten@gmail.com","avatar":"https://avatars.githubusercontent.com/u/597101?v=4"},"body":"On Mon, Jun 13, 2011 at 05:38, Jeff King <peff@peff.net> wrote:\n> On Sun, Jun 12, 2011 at 07:12:42PM +0000, Michael Witten wrote:\n>\n>> On Sun, Jun 12, 2011 at 18:57, Peter Kleiweg <pkleiweg@xs4all.nl> wrote:\n>> > I added a file that has file mode 600. When I do a check-out,\n>> > the file comes with mode 644. Is this supposed to happen? Then\n>> > how do I control what permissions files have?\n>>\n>> Do some googling.\n>\n> I really don't see the point of a response like this. It is one thing to\n> rudely point somebody to lmgtfy or an FAQ link. Then you're still being\n> rude, but at least you are pointing them in the right direction. But\n> this seems simply to make the list a less pleasant place _and_ to be\n> totally useless to the original poster. If you didn't want to give the\n> answer, wouldn't it have been better not to respond at all?\n\nNo.\n\nFirstly: My response shows that there are abundant answers, which is a\nnicer answer to receive than no answer at all.\n\nSecondly: I didn't see the point in RE-WRITING all that has been said\non the subject before, and I couldn't be sure that somebody else would\nbe willing to do the same too (I figured it was a good idea to supply\nat least one response).\n\nThirdly: Seriously, at least do some googling first.\n"},{"id":"169941","messageId":"BANLkTik-hvEyZoM1OeaBQUO=6knKYDW+dw@mail.gmail.com","threadId":"27607","inReplyTo":"4DF61634.7020003@dirk.my1.cc","subject":"Re: file mode","fromName":"Michael Witten","fromEmail":"mfwitten@gmail.com","sentAt":"2011-06-13T13:58:59Z","receivedAt":"2011-06-13T13:58:59Z","isPatch":false,"sender":{"key":"mfwitten@gmail.com","avatar":"https://avatars.githubusercontent.com/u/597101?v=4"},"body":"2011/6/13 Dirk Süsserott <newsletter@dirk.my1.cc>:\n> I think for most newbees this list is the last\n> effort AFTER googling, so googling won't help.\n\nNot in this case, clearly.\n"},{"id":"169942","messageId":"alpine.DEB.1.10.1106131624120.4221@localhost","threadId":"27607","inReplyTo":"20110613053814.GA2680@sigill.intra.peff.net","subject":"Re: file mode","fromName":"Peter Kleiweg","fromEmail":"pkleiweg@xs4all.nl","sentAt":"2011-06-13T14:25:41Z","receivedAt":"2011-06-13T14:25:41Z","isPatch":false,"sender":{"key":"pkleiweg@xs4all.nl","avatar":"https://gravatar.com/avatar/0d4b65b8b9262c0f6e91c618dbde9a639c46ac2e53c1374fafd448bbfd913979?d=mp&s=160"},"body":"Jeff King schreef op de 13e dag van de zomermaand van het jaar 2011:\n\n> On Sun, Jun 12, 2011 at 07:12:42PM +0000, Michael Witten wrote:\n> \n> > On Sun, Jun 12, 2011 at 18:57, Peter Kleiweg <pkleiweg@xs4all.nl> wrote:\n> > > I added a file that has file mode 600. When I do a check-out,\n> > > the file comes with mode 644. Is this supposed to happen? Then\n> > > how do I control what permissions files have?\n\n> We could add in a config option to respect file modes, but it has\n> generally been seen as not worthwhile. It solves only a part of the\n> general metadata problem, as it omits owner and group names or ids, as\n> well as extended metadata like ACLs.\n\nI see your point. \n\n\n \n> If modes are important to you, the suggested fixes are one of:\n\nThanks. This is really helpfull.\n\n\n\n-- \nPeter Kleiweg\nhttp://pkleiweg.home.xs4all.nl/\n"},{"id":"169966","messageId":"BANLkTimgby8-aBmXiZ72vtxoLO6Tr7zi2g@mail.gmail.com","threadId":"27607","inReplyTo":"BANLkTikZZsuQ9PoNvMOoRCg=kAnwQOvOSQ@mail.gmail.com","subject":"Re: file mode","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-06-13T21:18:58Z","receivedAt":"2011-06-13T21:18:58Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Mon, Jun 13, 2011 at 15:58, Michael Witten <mfwitten@gmail.com> wrote:\n\n> Firstly: My response shows that there are abundant answers, which is a\n> nicer answer to receive than no answer at all.\n\nI think having answers like yours is much worse than having no answer\nat all. I happen to know how git handles the storage of file\npermissions, but like Jeff I couldn't find anything useful either with\nsome quick searching around.\n\nBut it's very useful that the list have a friendly atmosphere where\npeople of different technical capability, or those that haven't found\nthe right terms to feed into a search engine can ask questions without\ngetting back an answer which at least to me seems very snarky.\n\nThere's a tendency in a lot of mailing list to accumulate a\nself-congratulating air from regulars \"in the know\" where people\nasking questions aren't made to feel welcome. Let's try to not become\none of those lists.\n"},{"id":"169981","messageId":"ea0263ba89684f958d91bbf1fa2dcdc6-mfwitten@gmail.com","threadId":"27607","inReplyTo":"BANLkTimgby8-aBmXiZ72vtxoLO6Tr7zi2g@mail.gmail.com","subject":"Re: file mode","fromName":"Michael Witten","fromEmail":"mfwitten@gmail.com","sentAt":null,"receivedAt":"2011-06-14T06:00:34Z","isPatch":false,"sender":{"key":"mfwitten@gmail.com","avatar":"https://avatars.githubusercontent.com/u/597101?v=4"},"body":"On Mon, 13 Jun 2011 23:18:58 +0200, Ævar Arnfjörð Bjarmason wrote:\n>> On Mon, Jun 13, 2011 at 05:38, Jeff King <peff@peff.net> wrote:\n>>> On Sun, Jun 12, 2011 at 07:12:42PM +0000, Michael Witten wrote:\n>>>\n>>>> On Sun, Jun 12, 2011 at 18:57, Peter Kleiweg <pkleiweg@xs4all.nl> wrote:\n>>>>> I added a file that has file mode 600. When I do a check-out,\n>>>>> the file comes with mode 644. Is this supposed to happen? Then\n>>>>> how do I control what permissions files have?\n>>>>\n>>>> Do some googling.\n>>>\n>>> I really don't see the point of a response like this. It is one thing to\n>>> rudely point somebody to lmgtfy or an FAQ link. Then you're still being\n>>> rude, but at least you are pointing them in the right direction. But\n>>> this seems simply to make the list a less pleasant place _and_ to be\n>>> totally useless to the original poster. If you didn't want to give the\n>>> answer, wouldn't it have been better not to respond at all?\n>>\n>> No.\n>>\n>> Firstly: My response shows that there are abundant answers, which is a\n>> nicer answer to receive than no answer at all.\n>>\n>> Secondly: I didn't see the point in RE-WRITING all that has been said\n>> on the subject before, and I couldn't be sure that somebody else would\n>> be willing to do the same too (I figured it was a good idea to supply\n>> at least one response).\n>> \n>> Thirdly: Seriously, at least do some googling first.\n>\n> I think having answers like yours is much worse than having no answer\n> at all. I happen to know how git handles the storage of file\n> permissions, but like Jeff I couldn't find anything useful either with\n> some quick searching around.\n>\n> But it's very useful that the list have a friendly atmosphere where\n> people of different technical capability, or those that haven't found\n> the right terms to feed into a search engine can ask questions without\n> getting back an answer which at least to me seems very snarky.\n>\n> There's a tendency in a lot of mailing list to accumulate a\n> self-congratulating air from regulars \"in the know\" where people\n> asking questions aren't made to feel welcome. Let's try to not become\n> one of those lists.\n\nPeter Kleiwig, I would be most grateful if you could find it in your heart\nto forgive a poor, misguided, mutton-faced, thistle-bottomed, pig-swiving,\nale-soused dungball such as myself.\n\nThis wretch, I, humbly prostrates himself before the feet of the offended\nin earnest compunction over his unconscionably uncouth utterances; may I\nnext time guard my tongue or, if finding myself unequal to that task, be\nso thoughtful as to bite it off, preserve it for at least a year and a day\nin a barrel of briny liquid most foul, and then—on the coldest day of\nwinter—dispense with it as fodder for the hunger pangs of feral cats!\n"}]}