fluent/fluentd — pull request #483 by kou (2014-11-21 08:25:06+00:00)
Title: out_file: don't create world writable directory in daemon mode

How to reproduce:

Create the following config file as file-fluentd.conf:

type forward

type file
path /tmp/x/y/z/a

Start fluentd:

% ruby -I lib bin/fluentd -c file-fluentd.conf --daemon fluentd.pid

Check permission of /tmp/x:

% stat /tmp/x | grep Access
Access: (0777/drwxrwxrwx) Uid: ( 1000/ kou) Gid: ( 1000/ kou)
Access: 2014-11-21 17:15:59.898444064 +0900

Permission is "0777/drwxrwxrwx".

Because daemon mode changes umask to `0000`. (It's natural for daemon.)