Skip to content

CLI directory options should take absolute path #836

Closed

Description

@jdkasten

I was attempting to determine if #443, was still a problem.

I ran letsencrypt --work-dir ../Downloads -vvvv run

I was left with the following error...

AH00526: Syntax error on line 10 of /etc/apache2/le_dvsni_cert_challenge.conf:
SSLCertificateFile: file '/etc/Downloads/OwYVJOOHVxWaHWNpNUgNDy4TIafggji3RdP0SymKozo.crt' does not exist or is empty
Action 'configtest' failed.
The Apache error log may have more information. 

I thought it to be a peculiar place to be looking for a cert.

The config file is populated with...

def get_cert_path(self, achall):
        """Returns standardized name for challenge certificate.
        :param achall: Annotated DVSNI challenge.
        :type achall: :class:`letsencrypt.achallenges.DVSNI`
        :returns: certificate file name
        :rtype: str
        """
        return os.path.join(self.configurator.config.work_dir,
                            achall.chall.encode("token") + ".crt")

Thus, leading me to the conclusion that we do not handle our directories appropriately from the command-line. I think it would be much easier if all of the work_dir, config_dir, and logs_dir were guaranteed to be an absolute path.

Providing the full path off the command-line did solve the problem.

Can we find a place to normalize all paths?

Activity

  1. kuba commented on Sep 27, 2015

    @kuba
    Contributor

    We should probably do os.path.expanduser/os.path.expandvars as well. We could guarantee that on the IConfig interface level, and fix all user input in configuration.NamespaceConfig.

  2. added this to the 1.0 for launch milestone on Oct 16, 2015
  3. self-assigned this
    on Oct 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions