From df44b24491dbe81bcdeb3c161bbb2f44f3bb0439 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 10 Jan 2010 22:15:15 +0000 Subject: mod_posix: Set umask to 'umask' from the config, or 027 --- plugins/mod_posix.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/mod_posix.lua') diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua index 0f28041c..8c2c7d7d 100644 --- a/plugins/mod_posix.lua +++ b/plugins/mod_posix.lua @@ -23,6 +23,9 @@ local prosody = _G.prosody; module.host = "*"; -- we're a global module +local umask = module:get_option("umask") or "027"; +pposix.umask(umask); + -- Allow switching away from root, some people like strange ports. module:add_event_hook("server-started", function () local uid = module:get_option("setuid"); -- cgit v1.2.3