I ran letsencrypt-auto with sudo


Hello, and thanks for your work and making this available!

The first time I ran letsencrypt-auto I used sudo at the command line. I later realised that it asks for the user account password to gain root privileges when it needs them, meaning I didn’t have to run it with sudo.

Is my having done so a problem? Which directories should I check the ownership of, perhaps changing the owner from root to me?

I’ve since successfully obtained a certificate using the webroot method without initially running with sudo, but I thought I should check anyway. Thanks.


The main /etc/letsencrypt directory should be owned by root, so you should be okay with that. You may want to check the application directory itself along with ~/.local/share/letsencrypt. If you used sudo to run it, that directory will probably be under the root user’s home directory. This should be okay though, as that local directory doesn’t hold any state information. That’s all under /etc/letsencrypt.


@motoko, many thanks.

I currently have the application at /opt/letsencrypt, with all files owned by root. Does this matter?

~/.local/share/letsencrypt was in my own home directory but owned by root, so I’ve changed owner to me.

/etc/letsencrypt is owned by root.


I don’t think the files under /opt/letsencrypt will matter, but you’ll need to be root to update those. Everything else sounds okay.