prosodyctl
changeset 8443 4e6710b4f873
parent 8288 433b2a41351f
parent 8422 57610304e30d
child 8564 7b9ffddc4276
equal deleted inserted replaced
8442:293dbb08427b 8443:4e6710b4f873
   943 			return 1; -- TODO Should we create it?
   943 			return 1; -- TODO Should we create it?
   944 		end
   944 		end
   945 		if pposix.getuid() ~= cert_dir_attrs.uid then
   945 		if pposix.getuid() ~= cert_dir_attrs.uid then
   946 			show_warning("The directory "..cert_basedir.." is not owned by the current user, won't be able to write files to it");
   946 			show_warning("The directory "..cert_basedir.." is not owned by the current user, won't be able to write files to it");
   947 			return 1;
   947 			return 1;
       
   948 		elseif not cert_dir_attrs.permissions then -- COMPAT with LuaFilesystem < 1.6.2 (hey CentOS!)
       
   949 			show_message("Unable to check permissions on "..cert_basedir.." (LuaFilesystem 1.6.2+ required)");
       
   950 			show_message("Please confirm that Prosody (and only Prosody) can write to this directory)");
   948 		elseif cert_dir_attrs.permissions:match("^%.w..%-..%-.$") then
   951 		elseif cert_dir_attrs.permissions:match("^%.w..%-..%-.$") then
   949 			show_warning("The directory "..cert_basedir.." not only writable by its owner");
   952 			show_warning("The directory "..cert_basedir.." not only writable by its owner");
   950 			return 1;
   953 			return 1;
   951 		end
   954 		end
   952 		local subcmd = table.remove(arg, 1);
   955 		local subcmd = table.remove(arg, 1);