[Mongrel] Rails log file permissions

km at acrasis.net km at acrasis.net
Mon Mar 12 13:25:00 EDT 2007

On 2007-03-09 14:48, Zed A. Shaw wrote:
> 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.

Thank you.  I found that adding this

   Rails::Initializer.run do |config|
      File.umask(026) if 0 == File.umask

into my Rails environment.rb has the desired effect on development.log.
It has no effect on mongrel.log.  Is that log file created by Rails?

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

The user's umask seems not to matter because Daemonize unconditionally
clears the umask.  By editing the source (daemonize.rb line 219), it is
possible to determine what mongrel.log's permissions will be.  Hopefully
a better solution is possible?


More information about the Mongrel-users mailing list