I have a "Business" shared hosting plan from Hostinger.
It offers the possibility to setup up to 100 websites, but unfortunately only 1 Let's Encrypt certificate
So I try to follow the tutorial they published from 2015 to 2017, before they removed it when they started to charge their automated procedure.
This procedure uses kelunik / acme-client (PHP).
The first steps are working fine:
Connection in SSH
Downloading and installing composer
Registering with Let's Encrypt (just add "--agree-terms" in the command to make it work)
But I have an error with the last step, Step 3, with the process of generating the SSL certificate.
This command... php bin/acme issue --domains mydomain.com:www.mydomain.com --path /home/u000000093/domains/mydomain.com/public_html:/home/u000000093/domains/mydomain.com/public_html --server letsencrypt
...generates this error message:
Uncaught Amp\File\FilesystemException in worker with message "Failed to
change owner for
chown(): Operation not permitted" and code "0"; use
Amp\Parallel\Worker\TaskFailure Exception::getOriginalTrace() for the
stack trace in the worker in
Amp\File\FilesystemException: The file operation failed in
Kelunik\AcmeClient\Stores\KeyStoreException: Could not save key: The
file operation failed in
It seems related to "Failed to change owner" for the "key.pem" file. "Operation not permitted".
Of course, as I'm on a shared hosting, I can't log with the "root" account.
But I don't think it's required as this exact same procedure, written by Hostinger, was working perfectly fine without.
At last FYI, in the command processing log, before the error message we can see 2 times 3 certificates and at least a first "key.perm" file is generated. But the certificate it contains is none of the 3 we can see in the log.
Any idea? :-/
P.S.: I've tried to contact kelunik (post a message on the dedicated blog page) but so far got no answer.
P.S.2: I'm not trying to contact Hostinger at this stage as they already declined giving support to this procedure in the past, since they sell an automated one (cf. 4th last comment below the Hostinger procedure).
I can't say that I'm familiar with this ACME client...
But I do find some things odd and wondered if you could test a bit.
I looked for "chown" in the source code but did not find it
I assume you have the latest client (0.2.14).
As a test, please try:
You should know that, in general, adding another ACM client won't require the removal of any existing ones.
So you can try as many as you like ... until you find one that works!
[without having to remove any of them - until you decide to do so]