Software /
code /
prosody
Diff
prosodyctl @ 9543:92bfb12684b0
prosodyctl: Allow cert dir to not be owned by root (fixes #1075)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 24 Oct 2018 17:04:17 +0200 |
parent | 8947:f12cc1d7aa65 |
child | 9544:cbd3b9d4c60b |
line wrap: on
line diff
--- a/prosodyctl Sun Oct 14 14:01:57 2018 +0200 +++ b/prosodyctl Wed Oct 24 17:04:17 2018 +0200 @@ -944,7 +944,8 @@ 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 + local uid = pposix.getuid(); + if uid ~= 0 and uid ~= 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!)