# HG changeset patch # User Kim Alvefur # Date 1492778093 -7200 # Node ID 939ccedb509da011e27548befcdef3b43944c798 # Parent 83d776b344ad638250eab74603fc9eadf62b0496 prosodyctl: Verify that directory certs are written to exists diff -r 83d776b344ad -r 939ccedb509d prosodyctl --- a/prosodyctl Fri Apr 21 14:24:59 2017 +0200 +++ b/prosodyctl Fri Apr 21 14:34:53 2017 +0200 @@ -831,6 +831,10 @@ openssl = require "util.openssl"; lfs = require "lfs"; local cert_dir_attrs = lfs.attributes(cert_basedir); + if not cert_dir_attrs then + show_warning("The directory "..cert_basedir.." does not exist"); + return 1; -- TODO Should we create it? + end 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;