diff options
author | Kim Alvefur <zash@zash.se> | 2018-10-24 17:13:49 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-10-24 17:13:49 +0200 |
commit | 8eb2a6f4c1d6c0c30688625ed351676ae6538dd2 (patch) | |
tree | bc074d699a2a38fda8df33742a84ece406017b98 | |
parent | 5756d8fc1abf35f7e544f46d450af212049e261a (diff) | |
download | prosody-8eb2a6f4c1d6c0c30688625ed351676ae6538dd2.tar.gz prosody-8eb2a6f4c1d6c0c30688625ed351676ae6538dd2.zip |
prosodyctl: Change ownership of certs to same as the cert base dir when running from a source checkout
-rwxr-xr-x | prosodyctl | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -867,7 +867,10 @@ local function copy(from, to, umask, owner, group) end assert(input:close()); assert(output:close()); - if owner and group then + if not prosody.installed then + -- FIXME this is possibly specific to GNU chown + os.execute(("chown -c --reference=%s %s"):format(sh_esc(cert_basedir), sh_esc(to))); + elseif owner and group then local ok = os.execute(("chown %s:%s %s"):format(sh_esc(owner), sh_esc(group), sh_esc(to))); assert(ok == true or ok == 0, "Failed to change ownership of "..to); end |