Comparison

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
comparison
equal deleted inserted replaced
8414:7ea3311ca632 8419:57610304e30d
945 return 1; -- TODO Should we create it? 945 return 1; -- TODO Should we create it?
946 end 946 end
947 if pposix.getuid() ~= cert_dir_attrs.uid then 947 if pposix.getuid() ~= cert_dir_attrs.uid then
948 show_warning("The directory "..cert_basedir.." is not owned by the current user, won't be able to write files to it"); 948 show_warning("The directory "..cert_basedir.." is not owned by the current user, won't be able to write files to it");
949 return 1; 949 return 1;
950 elseif not cert_dir_attrs.permissions then -- COMPAT with LuaFilesystem < 1.6.2 (hey CentOS!)
951 show_message("Unable to check permissions on "..cert_basedir.." (LuaFilesystem 1.6.2+ required)");
952 show_message("Please confirm that Prosody (and only Prosody) can write to this directory)");
950 elseif cert_dir_attrs.permissions:match("^%.w..%-..%-.$") then 953 elseif cert_dir_attrs.permissions:match("^%.w..%-..%-.$") then
951 show_warning("The directory "..cert_basedir.." not only writable by its owner"); 954 show_warning("The directory "..cert_basedir.." not only writable by its owner");
952 return 1; 955 return 1;
953 end 956 end
954 local subcmd = table.remove(arg, 1); 957 local subcmd = table.remove(arg, 1);