* file mode @ 2011-06-12 18:57 Peter Kleiweg 2011-06-12 19:12 ` Michael Witten 0 siblings, 1 reply; 9+ messages in thread From: Peter Kleiweg @ 2011-06-12 18:57 UTC (permalink / raw) To: git I added a file that has file mode 600. When I do a check-out, the file comes with mode 644. Is this supposed to happen? Then how do I control what permissions files have? -- Peter Kleiweg http://pkleiweg.home.xs4all.nl/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: file mode 2011-06-12 18:57 file mode Peter Kleiweg @ 2011-06-12 19:12 ` Michael Witten 2011-06-13 5:38 ` Jeff King 0 siblings, 1 reply; 9+ messages in thread From: Michael Witten @ 2011-06-12 19:12 UTC (permalink / raw) To: Peter Kleiweg; +Cc: git On Sun, Jun 12, 2011 at 18:57, Peter Kleiweg <pkleiweg@xs4all.nl> wrote: > I added a file that has file mode 600. When I do a check-out, > the file comes with mode 644. Is this supposed to happen? Then > how do I control what permissions files have? Do some googling. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: file mode 2011-06-12 19:12 ` Michael Witten @ 2011-06-13 5:38 ` Jeff King 2011-06-13 13:52 ` Dirk Süsserott ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Jeff King @ 2011-06-13 5:38 UTC (permalink / raw) To: Michael Witten; +Cc: Peter Kleiweg, git On Sun, Jun 12, 2011 at 07:12:42PM +0000, Michael Witten wrote: > On Sun, Jun 12, 2011 at 18:57, Peter Kleiweg <pkleiweg@xs4all.nl> wrote: > > I added a file that has file mode 600. When I do a check-out, > > the file comes with mode 644. Is this supposed to happen? Then > > how do I control what permissions files have? > > Do some googling. I really don't see the point of a response like this. It is one thing to rudely point somebody to lmgtfy or an FAQ link. Then you're still being rude, but at least you are pointing them in the right direction. But this seems simply to make the list a less pleasant place _and_ to be totally useless to the original poster. If you didn't want to give the answer, wouldn't it have been better not to respond at all? Peter: This is by design. While the git data structure can technically store unix mode bits in its trees, it was found early on in git's history that respecting anything beyond a simple executable bit ended up being more cumbersome for git's normal use cases (i.e., people storing code or other shared files in a repository). We could add in a config option to respect file modes, but it has generally been seen as not worthwhile. It solves only a part of the general metadata problem, as it omits owner and group names or ids, as well as extended metadata like ACLs. If modes are important to you, the suggested fixes are one of: 1. Use a tool like "metastore" that can be called from git hooks, and will save and restore file permissions in a file that is tracked in the repository. Do note that when using such a tool there is a race condition in protecting files (i.e., git will create your file as 644, and then metastore will correct it to 600; in the meantime, somebody could read your file). 2. Depending on exactly what you're storing, it may make sense to keep your repository in another directory, protected by permissions, and then use a separate tool to deploy your files from the repository to their ultimate location (e.g., a Makefile or other install tool). -Peff PS I actually _did_ try googling for this, and didn't come up with an answer that was as complete or clear (to me, anyway) as what I wrote above. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: file mode 2011-06-13 5:38 ` Jeff King @ 2011-06-13 13:52 ` Dirk Süsserott 2011-06-13 13:58 ` Michael Witten 2011-06-13 13:58 ` Michael Witten 2011-06-13 14:25 ` Peter Kleiweg 2 siblings, 1 reply; 9+ messages in thread From: Dirk Süsserott @ 2011-06-13 13:52 UTC (permalink / raw) To: Jeff King; +Cc: Michael Witten, Peter Kleiweg, git Am 13.06.2011 07:38 schrieb Jeff King: > On Sun, Jun 12, 2011 at 07:12:42PM +0000, Michael Witten wrote: > >> On Sun, Jun 12, 2011 at 18:57, Peter Kleiweg <pkleiweg@xs4all.nl> wrote: >>> I added a file that has file mode 600. When I do a check-out, >>> the file comes with mode 644. Is this supposed to happen? Then >>> how do I control what permissions files have? >> >> Do some googling. > > I really don't see the point of a response like this. It is one thing to > rudely point somebody to lmgtfy or an FAQ link. Then you're still being > rude, but at least you are pointing them in the right direction. But > this seems simply to make the list a less pleasant place _and_ to be > totally useless to the original poster. If you didn't want to give the > answer, wouldn't it have been better not to respond at all? > My sentiments exactly. Actually this list is one of the best I ever met or subscribed to. Even posts with the meaningless subject "Help needed" are answered. I've seen some of them. Few, though. Please, people, stick to what Peff suggests. I think for most newbees this list is the last effort AFTER googling, so googling won't help. Cheers, Dirk ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: file mode 2011-06-13 13:52 ` Dirk Süsserott @ 2011-06-13 13:58 ` Michael Witten 0 siblings, 0 replies; 9+ messages in thread From: Michael Witten @ 2011-06-13 13:58 UTC (permalink / raw) To: Dirk Süsserott; +Cc: Jeff King, Peter Kleiweg, git 2011/6/13 Dirk Süsserott <newsletter@dirk.my1.cc>: > I think for most newbees this list is the last > effort AFTER googling, so googling won't help. Not in this case, clearly. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: file mode 2011-06-13 5:38 ` Jeff King 2011-06-13 13:52 ` Dirk Süsserott @ 2011-06-13 13:58 ` Michael Witten 2011-06-13 21:18 ` Ævar Arnfjörð Bjarmason 2011-06-13 14:25 ` Peter Kleiweg 2 siblings, 1 reply; 9+ messages in thread From: Michael Witten @ 2011-06-13 13:58 UTC (permalink / raw) To: Jeff King; +Cc: Peter Kleiweg, git On Mon, Jun 13, 2011 at 05:38, Jeff King <peff@peff.net> wrote: > On Sun, Jun 12, 2011 at 07:12:42PM +0000, Michael Witten wrote: > >> On Sun, Jun 12, 2011 at 18:57, Peter Kleiweg <pkleiweg@xs4all.nl> wrote: >> > I added a file that has file mode 600. When I do a check-out, >> > the file comes with mode 644. Is this supposed to happen? Then >> > how do I control what permissions files have? >> >> Do some googling. > > I really don't see the point of a response like this. It is one thing to > rudely point somebody to lmgtfy or an FAQ link. Then you're still being > rude, but at least you are pointing them in the right direction. But > this seems simply to make the list a less pleasant place _and_ to be > totally useless to the original poster. If you didn't want to give the > answer, wouldn't it have been better not to respond at all? No. Firstly: My response shows that there are abundant answers, which is a nicer answer to receive than no answer at all. Secondly: I didn't see the point in RE-WRITING all that has been said on the subject before, and I couldn't be sure that somebody else would be willing to do the same too (I figured it was a good idea to supply at least one response). Thirdly: Seriously, at least do some googling first. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: file mode 2011-06-13 13:58 ` Michael Witten @ 2011-06-13 21:18 ` Ævar Arnfjörð Bjarmason 2011-06-14 5:51 ` Michael Witten 0 siblings, 1 reply; 9+ messages in thread From: Ævar Arnfjörð Bjarmason @ 2011-06-13 21:18 UTC (permalink / raw) To: Michael Witten; +Cc: Jeff King, Peter Kleiweg, git On Mon, Jun 13, 2011 at 15:58, Michael Witten <mfwitten@gmail.com> wrote: > Firstly: My response shows that there are abundant answers, which is a > nicer answer to receive than no answer at all. I think having answers like yours is much worse than having no answer at all. I happen to know how git handles the storage of file permissions, but like Jeff I couldn't find anything useful either with some quick searching around. But it's very useful that the list have a friendly atmosphere where people of different technical capability, or those that haven't found the right terms to feed into a search engine can ask questions without getting back an answer which at least to me seems very snarky. There's a tendency in a lot of mailing list to accumulate a self-congratulating air from regulars "in the know" where people asking questions aren't made to feel welcome. Let's try to not become one of those lists. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: file mode 2011-06-13 21:18 ` Ævar Arnfjörð Bjarmason @ 2011-06-14 5:51 ` Michael Witten 0 siblings, 0 replies; 9+ messages in thread From: Michael Witten @ 2011-06-14 5:51 UTC (permalink / raw) To: Peter Kleiweg; +Cc: Ævar Arnfjörð Bjarmason, Jeff King, git On Mon, 13 Jun 2011 23:18:58 +0200, Ævar Arnfjörð Bjarmason wrote: >> On Mon, Jun 13, 2011 at 05:38, Jeff King <peff@peff.net> wrote: >>> On Sun, Jun 12, 2011 at 07:12:42PM +0000, Michael Witten wrote: >>> >>>> On Sun, Jun 12, 2011 at 18:57, Peter Kleiweg <pkleiweg@xs4all.nl> wrote: >>>>> I added a file that has file mode 600. When I do a check-out, >>>>> the file comes with mode 644. Is this supposed to happen? Then >>>>> how do I control what permissions files have? >>>> >>>> Do some googling. >>> >>> I really don't see the point of a response like this. It is one thing to >>> rudely point somebody to lmgtfy or an FAQ link. Then you're still being >>> rude, but at least you are pointing them in the right direction. But >>> this seems simply to make the list a less pleasant place _and_ to be >>> totally useless to the original poster. If you didn't want to give the >>> answer, wouldn't it have been better not to respond at all? >> >> No. >> >> Firstly: My response shows that there are abundant answers, which is a >> nicer answer to receive than no answer at all. >> >> Secondly: I didn't see the point in RE-WRITING all that has been said >> on the subject before, and I couldn't be sure that somebody else would >> be willing to do the same too (I figured it was a good idea to supply >> at least one response). >> >> Thirdly: Seriously, at least do some googling first. > > I think having answers like yours is much worse than having no answer > at all. I happen to know how git handles the storage of file > permissions, but like Jeff I couldn't find anything useful either with > some quick searching around. > > But it's very useful that the list have a friendly atmosphere where > people of different technical capability, or those that haven't found > the right terms to feed into a search engine can ask questions without > getting back an answer which at least to me seems very snarky. > > There's a tendency in a lot of mailing list to accumulate a > self-congratulating air from regulars "in the know" where people > asking questions aren't made to feel welcome. Let's try to not become > one of those lists. Peter Kleiwig, I would be most grateful if you could find it in your heart to forgive a poor, misguided, mutton-faced, thistle-bottomed, pig-swiving, ale-soused dungball such as myself. This wretch, I, humbly prostrates himself before the feet of the offended in earnest compunction over his unconscionably uncouth utterances; may I next time guard my tongue or, if finding myself unequal to that task, be so thoughtful as to bite it off, preserve it for at least a year and a day in a barrel of briny liquid most foul, and then—on the coldest day of winter—dispense with it as fodder for the hunger pangs of feral cats! ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: file mode 2011-06-13 5:38 ` Jeff King 2011-06-13 13:52 ` Dirk Süsserott 2011-06-13 13:58 ` Michael Witten @ 2011-06-13 14:25 ` Peter Kleiweg 2 siblings, 0 replies; 9+ messages in thread From: Peter Kleiweg @ 2011-06-13 14:25 UTC (permalink / raw) To: git Jeff King schreef op de 13e dag van de zomermaand van het jaar 2011: > On Sun, Jun 12, 2011 at 07:12:42PM +0000, Michael Witten wrote: > > > On Sun, Jun 12, 2011 at 18:57, Peter Kleiweg <pkleiweg@xs4all.nl> wrote: > > > I added a file that has file mode 600. When I do a check-out, > > > the file comes with mode 644. Is this supposed to happen? Then > > > how do I control what permissions files have? > We could add in a config option to respect file modes, but it has > generally been seen as not worthwhile. It solves only a part of the > general metadata problem, as it omits owner and group names or ids, as > well as extended metadata like ACLs. I see your point. > If modes are important to you, the suggested fixes are one of: Thanks. This is really helpfull. -- Peter Kleiweg http://pkleiweg.home.xs4all.nl/ ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-06-14 6:16 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-06-12 18:57 file mode Peter Kleiweg 2011-06-12 19:12 ` Michael Witten 2011-06-13 5:38 ` Jeff King 2011-06-13 13:52 ` Dirk Süsserott 2011-06-13 13:58 ` Michael Witten 2011-06-13 13:58 ` Michael Witten 2011-06-13 21:18 ` Ævar Arnfjörð Bjarmason 2011-06-14 5:51 ` Michael Witten 2011-06-13 14:25 ` Peter Kleiweg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).