httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject Re: [PATCH] RewriteLock permissions
Date Sat, 11 Jul 1998 08:34:05 GMT

In article <XFMail.980710192615.sfx@unix-ag.org> you wrote:

> mod_rewrite creates the RewriteLock in init_module() with mode 644...
> The result is a file which is only writeable by the user of the
> root process and therefore the childs have no write access to the lockfile.
> The error log is flooded with "Permission denied: mod_rewrite: Child could
> not open RewriteLock file".

> Calling chown() after the file was created (and Apache was started as root)
> should fix the problem (see attachment).

Sounds reasonable, so +1.
But I would write it more clear in style as:

    if (geteuid() == 0 /*superuser*/) 
        chown(conf->rewritelockfile, s->server_uid, -1 /*no gid change*/);

;-)
                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message