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

Re: apt-get --reinstall ...



(Moving to more appropriate list.)

Henrique de Moraes Holschuh wrote:
> > Dpkg does not change the permissions of existing directories. Ever, as
> > far as I know. Perhaps it should have a flag to make it do that, for the
> > times when you've got screwed up directory perms.
> 
> Is there a Real Good Reason(TM) for that? Especialy now that we have
> dpkg-statoverride and would expect non-overriden perms to be reset to their
> proper ones?

I suspect that it has something to do with directories being shared
amoung all the packages that contain that directory, and something to do
with pre-statoverrride thinking.

It has its plusses and its minuses. It does make it a lot harder for Joe
Developer to completly fuck your system over by changing / to mode 600
just by messing up the permissions of that directory in their package.
On the other hand, it hides problems too. My slrn package does this in
its rules file:

        # The perms on this directory need to match the perms ppp gives it
        # in case slrn is installed prior to ppp.
        chmod 700 debian/slrn/etc/ppp debian/slrnpull/etc/ppp

I wonder how many of the packages that contain /etc/ppp have it mode 755, and
so can cause it to get the wrong perms if they're installed before ppp?
Those are all bugs, but bugs that are generally hidden because of dpkg's
 behavior.

All in all, I'd like to see this turned off after woody and we can see what
breaks and decide if it should stay off. And a flag to make dpkg reset
directory perms would be an easy way to do that (just drop it in
/etc/dpkg/dpkg.cfg). I might even be up for coding this, if statoverride
already supports overriding the permissions of directories.

-- 
see shy jo



Reply to: