# HG changeset patch # User Kim Alvefur # Date 1540393457 -7200 # Node ID 92bfb12684b03ae460844b489de3e7ea9c36b624 # Parent 09e7b0048ebe4a561e3c4e17136766f0c577846a prosodyctl: Allow cert dir to not be owned by root (fixes #1075) diff -r 09e7b0048ebe -r 92bfb12684b0 prosodyctl --- a/prosodyctl Sun Oct 14 14:01:57 2018 +0200 +++ b/prosodyctl Wed Oct 24 17:04:17 2018 +0200 @@ -944,7 +944,8 @@ show_warning("The directory "..cert_basedir.." does not exist"); return 1; -- TODO Should we create it? end - if pposix.getuid() ~= cert_dir_attrs.uid then + local uid = pposix.getuid(); + if uid ~= 0 and uid ~= cert_dir_attrs.uid then show_warning("The directory "..cert_basedir.." is not owned by the current user, won't be able to write files to it"); return 1; elseif not cert_dir_attrs.permissions then -- COMPAT with LuaFilesystem < 1.6.2 (hey CentOS!)