git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: tracking perms/ownership

From
JEJosh England <jjengla@sandia.gov>
Date
Aug 24, 2007, 18:15 UTC
Message-ID
<1187979317.6357.155.camel@beauty>
In-Reply-To
<alpine.LFD.0.999.0708241039250.25853@woody.linux-foundation.org>
On Fri, 2007-08-24 at 10:51 -0700, Linus Torvalds wrote:
Show 11 quoted lines
> Because full permissions and ownership (think ACL's) simply aren't 
> "content" enough. The way to _reliably_ turn them into "content" that can 
> be tracked, is to make it some form of file content.
> 
> Because otherwise, you will always hit situations where you simply cannot 
> access it sanely. Even as an administrator you might need to do some 
> emergency fixup, but you may be on vacation, and the only thing you have 
> access to is some machine that you're not root on - and you'd like to send 
> a "git bundle" with the fix to your less-than-stellar stand-in that is 
> knee-deep in sh*t because he doesn't know the system, and you're on some 
> sunny tropical island.

Using the .gitattributes approach essentially does turn perms/ownership into trackable content. A non-root user could specify the ownership of certain files just by editing the .gitattributes, much in the same way a non-root user can create an initramfs filesystem.

> Or just imagine the case where you have slightly different setups for 
> different people - some have ACL's, some have just basic permissions. But 
> you want to maintain an image that works for both cases. What do you do?

punt :) Simple unix ownership and perms are a good first cut. ACL's could probably be handled in much the same way, but converting between unix perms and ACLs might have to be a separate attribute/filter entirely.

Show 28 quoted lines
> See? If you just accept the fact that ownership and permissions are 
> totally "separate content" that is tracked AS CONTENT, and not as the 
> filesystem thing, you solve all these problems.
> 
> > git is a content _tracker_.  It tracks contents, also contents that
> > move around.  If it can't track the permissions moving around as well,
> > it's sort of pointless to integrate this into git: if you have to
> > manage the stuff yourself, anyway, there is no point in creating the
> > illusion that it is done by git.
> 
> Fair enough - I'll certainly agree with the notion that we don't 
> necessarily need any integration of permissions/ownership into git at 
> all, and you can always do it as a totally independent layer.
> 
> > > Your choice. But I know which one I'd choose.
> > 
> > That's fine.  But you don't actually need git at all to implement your
> > choice, so this is orthogonal to whether having an option to do it
> > inside of git might be worth having.
> 
> But I care about git having a *sane*design*, whether I use all the 
> features or not. Because I simply care about my tools at a higher level 
> than most users do. Which means that it doesn't matter whether I'll use 
> permissions/ownership tracking or not - I still require that git do it 
> *sanely* from my standpoint of having a good content tracker.
> 
> And that means tracking those things *separately*, and not trying to mess 
> up the "tree" structure, for example.

Do you think its OK to cache this stuff in the index, though? write-tree could then just dump the perms/ownership out as gitattributes somewhere.

-JE
Previous: Linus TorvaldsNext: Linus Torvalds
Message 15 of 41 in “empty directories”
  1. Josh EnglandAug 21, 2007
  2. SeanAug 21, 2007
  3. Josh EnglandAug 22, 2007
  4. Linus TorvaldsAug 22, 2007
  5. David KastrupAug 22, 2007
  6. Josh EnglandAug 23, 2007
  7. tracking perms/ownership [was: empty directories]Josh England, Aug 23, 2007
  8. Junio C HamanoAug 23, 2007
  9. Linus TorvaldsAug 23, 2007
  10. David KastrupAug 24, 2007
  11. Linus TorvaldsAug 24, 2007
  12. Josh EnglandAug 24, 2007
  13. David KastrupAug 24, 2007
  14. Linus TorvaldsAug 24, 2007
  15. Josh EnglandAug 24, 2007
  16. Linus TorvaldsAug 24, 2007
  17. Josh EnglandAug 24, 2007
  18. Junio C HamanoAug 24, 2007
  19. Josh EnglandAug 24, 2007
  20. Robin RosenbergAug 24, 2007
  21. David KastrupAug 24, 2007
  22. Josh EnglandAug 24, 2007
  23. Junio C HamanoAug 24, 2007
  24. Josh EnglandAug 24, 2007
  25. Josh EnglandAug 24, 2007
  26. Josh EnglandAug 24, 2007
  27. Johannes SchindelinAug 24, 2007
  28. Jeff KingAug 24, 2007
  29. Josh EnglandAug 24, 2007
  30. Jeff KingAug 24, 2007
  31. Johannes SchindelinAug 25, 2007
  32. Junio C HamanoAug 25, 2007
  33. Junio C HamanoAug 25, 2007
  34. Jeff KingAug 24, 2007
  35. Johannes SchindelinAug 25, 2007
  36. Jason GarberAug 24, 2007
  37. Jakub NarebskiAug 22, 2007
  38. Jakub NarebskiAug 22, 2007
  39. Salikh ZakirovAug 22, 2007
  40. Linus TorvaldsAug 22, 2007
  41. David KastrupAug 22, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.