aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xprosodyctl3
1 files changed, 2 insertions, 1 deletions
diff --git a/prosodyctl b/prosodyctl
index e280367d..380f8e04 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -944,7 +944,8 @@ function commands.cert(arg)
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!)