Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/mydomain/fullchain.pem.
But I can't reach this directory in macOS to copy the certificates. Even if I do:
sudo cd /etc/letsencrypt/live/mydomain does not work.
I know I can sudo chown -R $(whoami) /etc/letsencrypt
but maybe there is a reason Let'sEncrypt did not gave access to $(whoami) and I am afraid of changing that without knowing the implications.
It seems a basic unix question, but I am stuck on that.
By the way, the reason this does not work is that cd is a shell builtin command (it's part of your shell, not a separate external command). "What directory you're in" (current working directory) is an attribute of a particular running process and so it can only be changed by an internal functionality, not by running a separate program. However, an already-running program cannot increase its privileges and sudo can only grant root (or other) permissions to a newly-run program.