On Fri, 18 Feb 2005, Ken Jones wrote:
On Thursday 17 February 2005 8:44 pm, Charles Sprickman wrote:Howdy,
Can anyone shed some light on this? I've got maildirsize files randomly flipping to root ownership. I'm a bit confused as to how this could happen - all delivery is done by vpopmail, and none of that stuff runs as root. That leaves courier-imap/pop, which do run as root.
So I posted to the courier list (asbestos on, check...) and Mr. Sam replied that this is a "known bug in vpopmail". Looking through the vpopmail archives I don't see any sign of this. I do see a few threads about size miscalculations, but that's an entirely different issue.
Any ideas?
I checked the code and where the maildirsize file gets created it does not set the ownership. Most of the time the permissions get set with the setuid call. But if it gets called some other way without the setuid then the maildirsize file would probably be created as the owner of the process,not the owner of the directory.
Perhaps we should put some set ownership code around the creation of the maildirsize file?
Should I go ahead and formally request that at the SF bug tracker? Re-reading this thread, I see Paul noted that he does see vuserinfo do this sometimes. I've never caught it, but if he has, that's good enough for me. The list of stuff that runs as root (as far as I know ALL vpopmail cli tools need to run as root) is really short...
Thanks,
Charles
Ken Jones