#1217 prosodyctl cert import help message changes with --root

Reporter Arun Isaac
Owner Zash
Created
Updated
Stars ★ (1)
Tags
  • Status-Started
  • Priority-Medium
  • Type-Defect
  1. Arun Isaac on

    The output of "prosodyctl help" regarding "cert import" changes depending on whether the --root flag is supplied. With the --root flag, the output is cert import [HOSTNAME+] /path/to/certs [/other/paths/]+ Copies certificates to /etc/prosody/certs Without the --root flag, the output is cert import [HOSTNAME+] /path/to/certs [/other/paths/]+ Copies certificates to /var/lib/prosody Notice the change in certificate directory. This dependence of the help message on the flags supplied is unintuitive. Perhaps, this should be fixed.

  2. Zash on

    Thanks for the report. Sorry for the slow reply. prosodyctl will when called without the --root flag change into the prosody user. This user doesn't usually have write permission to /etc, so instead it writes to the data directory, which is reflected in the help message. I'm not sure how this can be improved.

    Changes
    • tags Status-NeedInfo
  3. Arun Isaac on

    The help message should remain the same regardless of the flags supplied. I don't think there is a use case to copy certificates to /var/lib/prosody. One always wants to copy certificates to /etc/prosody/certs. So, perhaps, the help message should be hard coded to /etc/prosody/certs and "cert import" should fail when invoked without the --root flag.

  4. Zash on

    I tried fixing this but ran into promlems relating to #999

    Changes
    • tags Status-Started
    • owner Zash

New comment

Not published. Used for spam prevention and optional update notifications.