From 9ec5b6b4903cdab7cc03a82304415a0db647c4b6 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 29 May 2009 15:29:02 +0000 Subject: Chown /etc/fetchmailrc to user fetchmail for alpine 1.9 --- fetchmail-model.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fetchmail-model.lua') diff --git a/fetchmail-model.lua b/fetchmail-model.lua index 10fc46a..eab1701 100644 --- a/fetchmail-model.lua +++ b/fetchmail-model.lua @@ -279,6 +279,7 @@ local function writeentryline(entrystruct, entryline) fs.write_file(configfile, string.gsub(table.concat(lines), "\n+$", "")) posix.chmod(configfile, "rw-------") + posix.chown(configfile, posix.getpasswd("fetchmail", "uid") or 0) config = nil end @@ -396,6 +397,7 @@ function update_filecontent(filedetails) -- FIXME - validation local retval = modelfunctions.setfiledetails(filedetails, {configfile}) posix.chmod(configfile, "rw-------") + posix.chown(configfile, posix.getpasswd("fetchmail", "uid") or 0) config = nil return retval end @@ -450,6 +452,7 @@ function updateconfig(conf) fs.write_file(configfile, table.concat(lines)) posix.chmod(configfile, "rw-------") + posix.chown(configfile, posix.getpasswd("fetchmail", "uid") or 0) config = nil fs.write_file(confdfile, format.update_ini_file(fs.read_file(confdfile) or "", "", "polling_period", '"'..conf.value.interval.value..'"')) -- cgit v1.2.3