Control: retitle -1 sponge: preserves permissions but not ownership Control: severity -1 normal Control: tag -1 - wontfix
On Tue, Oct 01, 2019 at 07:27:57PM +0000, Andy Smith wrote: > Hi, > > On Thu, Apr 18, 2019 at 10:42:54PM +0200, Nicolas Schier wrote: > > Why do you think that sponge ought to preserve the owner? Did the man > > page induce that somehow? > > I was caught out by this just now, and got as far as "bugreport > moreutils" before I found this existing bug. > > When I read "preserves permissions" in the man page, my brain just > went on auto-pilot and assumed this meant ownership as well. I think > this is encouraged along by a common use-case of sponge as a > replacement for IO redirection, which as Hamish already noted does > preserve ownership. Thanks for pointing that out. Personally, I think that the man page is actually correct, as 'permissions' does not include 'ownership' (from the technical point of view), but I understand that this may be confusing for others. > I appreciate there is room for difference of opinion here over what > behaviour is surprising or not, but I don't think it is just Hamish > and I who would get surprised. So if preserving ownership is > considered not the job of sponge then perhaps this could be called > out in the man page near where it currently says that permissions > are preserved? I think I'm going to prepare a patch, clarifying the wording of the man page. I can also ask Joey (upstream author) for commenting on the differences of expected behaviour, but I am expecting that preserving ownership will not become a feature of 'sponge'. Thanks for your reports! Kind regards, Nicolas