Re: [Lurker-users] Problem in lurker-prune: utime used to touch file not owned by caller.
Brought to you by:
terpstra
|
From: Kaz K. <ka...@ky...> - 2013-09-29 21:12:49
|
On 29.09.2013 14:06, Kaz Kylheku wrote:
> Hi all,
>
> There is this code in prune.cpp:
>
> // set the mtime stamp to beginfix
> struct utimbuf touch;
> touch.actime = touch.modtime = beginfix;
> if (utime("lurker.docroot", &touch) < 0)
> {
> cerr << "touching " << docfile << ": " <<
> strerror(errno) << endl;
> return 1;
> }
>
> This code is hostile to installations which use two user accounts for
> the archiving operation.
By the way, I realize that a workaround is to simply run this operation
as the web-side user, like "www-data". The web data document root
should only ever be written by this user, and never by the mailing
list user account like "list".
Still, it violates the idea that the lurker-* commands should be
runnable in either account in a dual-account setup.
If I happen to be "su"-ed to user "list", I will get an error from the
above code if I run "lurker-prune", though of course in my cron
job, I can have it run as user "www-data".
|