file mode
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?
Signature · 2 lines
Peter Kleiweg http://pkleiweg.home.xs4all.nl/
Quoted 3 lines · Peter Kleiweg
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.
Quoted 6 lines · Michael Witten
Quoted 3 lines · Peter Kleiweg
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.
Am 13.06.2011 07:38 schrieb Jeff King:
Quoted 7 lines · Michael Witten
Quoted 6 lines · Peter Kleiweg
Quoted 3 lines
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?
Quoted 9 lines
Quoted 1 line
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
2011/6/13 Dirk Süsserott <[email protected]>:
Quoted 2 lines
I think for most newbees this list is the last
effort AFTER googling, so googling won't help.
Not in this case, clearly.
Quoted 7 lines · Jeff King
Quoted 5 lines · Michael Witten
Quoted 3 lines · Peter Kleiweg
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?
Quoted 8 lines
Quoted 1 line
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.
Quoted 2 lines · Michael Witten
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.
Quoted 39 lines · Ævar Arnfjörð Bjarmason
Quoted 22 lines · Jeff King
Quoted 7 lines · Michael Witten
Quoted 6 lines · Peter Kleiweg
Quoted 3 lines
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?
Quoted 8 lines
Quoted 1 line
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.
Quoted 6 lines
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.
Quoted 4 lines
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!
Jeff King schreef op de 13e dag van de zomermaand van het jaar 2011:
Quoted 11 lines · Michael Witten
Quoted 5 lines · Peter Kleiweg
Quoted 3 lines
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.
Quoted 1 line
If modes are important to you, the suggested fixes are one of:
Thanks. This is really helpfull.
Signature · 2 lines
Peter Kleiweg http://pkleiweg.home.xs4all.nl/