Re: [PATCH v4 2/2] interpret-trailers: add option for in-place editing
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jan 19, 2016, 21:45 UTC
- Message-ID
- <CAPig+cRHTs9q4k=CqtY2j=ZtTYMU6_SPeCHkQe4m5AGXOjg_Ww@mail.gmail.com>
- In-Reply-To
- <xmqqfuxt9ti3.fsf@gitster.mtv.corp.google.com>
On Tue, Jan 19, 2016 at 3:58 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes: >> My understanding is that SANITY is an expectation that directory >> permissions work in an expected POSIXy way: that is, a file can't be >> deleted when its containing directory lacks 'write', and a file can't >> be read/accessed when the directory has neither 'read' nor 'execute'. >> This doesn't say anything about root not being allowed to read a file >> when the file itself lacks 'read'. > > In short, SANITY is "does looking at permission bits sufficient to > anticipate what the filesystem would do?" while POSIXPERM is "can > chmod be used to tweak permission bits of the filesystem" (a > filesystem that lacks permission bits support would qualify as > !POSIXPERM, as there is nothing to tweak in the first place). > > I suspect the comment added by f400e51c and its patch description > stressed too much about permission of a directory affecting what we > can do to files inside the directory, and failed to describe another > criteria for a sane environment: "files whose permission bits say > you shouldn't be able to read or write cannot be read or written".
You suspect correctly. It was exactly the comment added by f400e51c that misled me. (t/README does, on the other hand, mention "root", as I noticed after reading your previous response.)
Thanks for spelling all this out. Hopefully, others reading your reply (now and later) will be less confused than I.