From c09bd4346b20cce04769111b0d2c8c93383eebe5 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 30 Nov 2017 18:47:06 +0000 Subject: prosodyctl: Fix traceback with lfs < 1.6.2 and show warning --- prosodyctl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'prosodyctl') 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; -- cgit v1.2.3