Navigation Menu

Skip to content

Commit

Permalink
Enforce umask to be 022
Browse files Browse the repository at this point in the history
This is needed to make umask 022 when fluentd is daemonized.
  • Loading branch information
darashi committed Feb 27, 2014
1 parent f07b8c9 commit f2e7a70
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/droonga/slice.rb
Expand Up @@ -58,6 +58,7 @@ def process(message)

private
def ensure_database
enforce_umask
database_path = @options[:database]
return if File.exist?(database_path)
FileUtils.mkdir_p(File.dirname(database_path))
Expand All @@ -70,6 +71,10 @@ def ensure_database
end
end

def enforce_umask
File.umask(022)
end

def start_supervisor
@supervisor = ServerEngine::Supervisor.new(Server, Worker) do
force_options = {
Expand Down

0 comments on commit f2e7a70

Please sign in to comment.