aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2017-11-30 18:47:06 +0000
committerMatthew Wild <mwild1@gmail.com>2017-11-30 18:47:06 +0000
commitbb6a7489435bc23f4cdfdb921619089cfb1d4473 (patch)
tree5b2f06773a34a0aa959ca4625e47fd7f32cb6bfe
parent4b1e3a2b85b3c174485a030477437428a5a23eeb (diff)
downloadprosody-bb6a7489435bc23f4cdfdb921619089cfb1d4473.tar.gz
prosody-bb6a7489435bc23f4cdfdb921619089cfb1d4473.zip
prosodyctl: Fix traceback with lfs < 1.6.2 and show warning
-rwxr-xr-xprosodyctl3
1 files changed, 3 insertions, 0 deletions
diff --git a/prosodyctl b/prosodyctl
index eaccf1d9..c4f51f35 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -947,6 +947,9 @@ function commands.cert(arg)
if pposix.getuid() ~= 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!)
+ show_message("Unable to check permissions on "..cert_basedir.." (LuaFilesystem 1.6.2+ required)");
+ show_message("Please confirm that Prosody (and only Prosody) can write to this directory)");
elseif cert_dir_attrs.permissions:match("^%.w..%-..%-.$") then
show_warning("The directory "..cert_basedir.." not only writable by its owner");
return 1;