pcp
[Top] [All Lists]

Re: [pcp] Collateral damage in non-root changes

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: [pcp] Collateral damage in non-root changes
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Thu, 22 Nov 2012 17:39:02 +1100
Cc: pcp@xxxxxxxxxxx
In-reply-to: <1659133897.29841595.1353552308874.JavaMail.root@xxxxxxxxxx>
References: <1659133897.29841595.1353552308874.JavaMail.root@xxxxxxxxxx>
On Wed, 2012-11-21 at 21:45 -0500, Nathan Scott wrote:
...
> That doesn't make sense to me (nor do I see how chown on the
> pmlogger directory changes this behaviour) - the permissions
> of a symlink are irrelevant - as described here...
> http://superuser.com/questions/303040/how-do-file-permissions-apply-to-symlinks
> 
> Which suggests its the directory... hmmm... the only thing I
> can think of is a kernel issue. ...

Nod.

> Is it possible that there was
> a process holding open the existing /var/lib/pcp/tmp/pmlogger
> when the new deb was installed (with super-dh_fixperms powers)
> and somehow the in-kernel cached dentry / inode for the earlier
> directory is being used for permission checks rather than the
> new one?

No ... see below.

> A reboot would prove it one way or the other, cos for me this
> does not happen (have checked two machines now - see below).

Seen on two different Linux Mint machines, rebooted one, still a
problem.  Problem also seen on Ubuntu, but not Debian or Mac OS X
(that's all the testing I've done at this point).

The attached script shows the problem nicely ... I get lots of FAILED
messages ... 8^(>

I agree it is a kernel botch, probably by Ubuntu ... maybe fixed in
their latest versions (my Ubuntu and Linux Mint are going on for 12
months out of date).

My suggestion is we note this in case it comes up again for a real user
(I don't count!) and pro tem I'll apply my chown workaround outside the
package builds so my QA works on the systems where the kernel bug is
seen.

Attachment: symtest
Description: application/shellscript

<Prev in Thread] Current Thread [Next in Thread>