From 405b72f2bd49f7111b4409db91f92d3bdde69d49 Mon Sep 17 00:00:00 2001 From: Masahiro Nakagawa Date: Mon, 11 May 2020 23:15:42 +0900 Subject: [PATCH] supervisor: Call File.umask to follow serverengine routine. fix #2984 Signed-off-by: Masahiro Nakagawa --- lib/fluent/supervisor.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/fluent/supervisor.rb b/lib/fluent/supervisor.rb index c6e3174cad..91ac54253f 100644 --- a/lib/fluent/supervisor.rb +++ b/lib/fluent/supervisor.rb @@ -593,7 +593,10 @@ def run_worker main_process do create_socket_manager if @standalone_worker - ServerEngine::Privilege.change(@chuser, @chgroup) if @standalone_worker + if @standalone_worker + ServerEngine::Privilege.change(@chuser, @chgroup) + File.umask(0) + end MessagePackFactory.init(enable_time_support: @system_config.enable_msgpack_time_support) Fluent::Engine.init(@system_config) Fluent::Engine.run_configure(@conf)