[Mongrel] Rails log file permissions

Zed A. Shaw zedshaw at zedshaw.com
Fri Mar 9 17:48:16 EST 2007

On Fri, 9 Mar 2007 10:48:31 -0800
km at acrasis.net wrote:

> When I start a Rails server with
>   $ mongrel_rails start --chdir ~/railsapp --port 3003 --pid \
>       /home/me/railsapp/tmp/pids/mongrel.pid --daemonize
> the server starts and opens two log files, development.log and
> mongrel.log.  Both have permissions -rw-rw-rw-.
> If I omit --deamonize, it opens one log file, development.log, with
> permissions -rw-r--r--.
> I would like to make the server use permissions of my choice in
> either case.  How to do that?

If it's configurable you'd configure it in Rails not Mongrel (since
that log is created by Rails, not Mongrel).  Look at the documentation
for the Logger class in Ruby, but DO NOT use Logger's rotation
feature.  It will crash your system hard.

You should also check your umask for the user that you're running as a

Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu
http://www.awprofessional.com/title/0321483502 -- The Mongrel Book

More information about the Mongrel-users mailing list