Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Challenge files are created with insufficient permissions #9920

Open
Leonetienne opened this issue Mar 29, 2024 · 0 comments
Open

Challenge files are created with insufficient permissions #9920

Leonetienne opened this issue Mar 29, 2024 · 0 comments

Comments

@Leonetienne
Copy link

Leonetienne commented Mar 29, 2024

Plattform:

Ubuntu/Linux 5.4.0-174-generic 86_64

Certbot was installed via:

apt-get

I ran this command and it produced this output:

certbot certonly -n -d <my-domain> --webroot --webroot-path=/var/www/html
output: challenge files in /var/www/html, which are only readable by root (challenge files are set to root:root 640).

# pwd
/var/www/html/.well-known/acme-challenge
# ls -l
total 4
-rw-r----- 1 root root 87 Mar 29 15:10 NPm<...>g4
# ls -l ..
total 8
drwxr-xr-x 2 www-data www-data 4096 Mar 29 15:10 acme-challenge

Certbot's behavior differed from what I expected because:

only webservers running as root are able to read and thus serve acme challenge files. webservers should not run as root.
Certbot should either use the permissions of the acme-challenge directory (i set mine to www-data:www-data:755), or support a flag like --acme-challenge-files-umask 644 and --acme-challenge-files-uid www-data. At least provide a hook for when challenge files have been created.

There have been various issues regarding this, all of which have been closed for no good reason. (e.g. stale, inactivity, etc.)
This needs to be addressed. Looking at threads and closed issues, this has been an issue for years.

This is a rather simple issue, with an (i guess) simple fix, which is keeping me from being able to use certbot at all at the time.

@Leonetienne Leonetienne changed the title Challange files are created with insufficient permissions Challenge files are created with insufficient permissions Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant