Software /
code /
prosody
Diff
prosodyctl @ 8419:57610304e30d
prosodyctl: Fix traceback with lfs < 1.6.2 and show warning
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 30 Nov 2017 18:47:06 +0000 |
parent | 8277:57c5dd08ff0a |
child | 8440:4e6710b4f873 |
child | 8560:489998717387 |
line wrap: on
line diff
--- a/prosodyctl Tue Nov 14 15:20:14 2017 +0100 +++ b/prosodyctl Thu Nov 30 18:47:06 2017 +0000 @@ -947,6 +947,9 @@ 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;