[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#568313: Suggestion: forbid the use of dpkg-statoverride in postinst scripts, except for --list



Brandon <winterknight@nerdshack.com> writes:

>> If you set the permissions with chown, aren't they overwritten every
>> time the package is upgraded and then have to be reset again

> No. You have to check for overrides first, and only chown/chmod if there
> aren't any in place.  You have to do this regardless of which method you
> use.

Your second sentence doesn't, so far as I can tell, address my point, so
maybe we're talking past each other.  I'm saying that I believe dpkg, when
unpacking the package, will reset the ownership and permissions of any
files contained in that package to match what's in the package, changing
the effect of the chown in the postinst script, unless dpkg-statoverride
was used.

>> leaving windows on every upgrade when they have the wrong permissions?

> I don't know what this means.

If I'm correct about how this currently works, during an upgrade, a file
that's been changed with chown will have its ownership revert to the
ownership specified in the *.deb file during the unpack phase, and then
will have to be changed back to the owner the maintainer desires in the
postinst phase, just as would be the case for the initial install.

If dpkg-statoverride is used instead, I believe that this only happens
during the original install and upgrades then carry over the same
ownership and permissions through the unpack phase.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: