My Domain: loft-nextcloud.loft.aero
Command: None, it is running it automatically via SNAP
Service: Apache
OS: Ubuntu 18.04 LTS
I am running letsencrypt with nextcloud snap. The initial install and certs went fine then I received an error email saying that it needed to be renewed. When I look in the logs, this is what I am seeing:
2019-05-15 03:56:35,790:DEBUG:certbot.storage:Writing new private key to
/var/snap/nextcloud/current/certs/certbot/config/archive/loft-nextcloud.loft.aero/privkey3.pem.
2019-05-15 03:56:35,791:WARNING:certbot.renewal:Attempting to renew cert (loft-nextcloud.loft.aero)
from /var/snap/nextcloud/current/certs/certbot/config/renewal/loft-nextcloud.loft.aero.conf produced an
unexpected error: [Errno 1] Operation not permitted:
'/var/snap/nextcloud/current/certs/certbot/config/archive/loft-nextcloud.loft.aero/privkey3.pem'. Skipping.
2019-05-15 03:56:35,793:DEBUG:certbot.renewal:Traceback was:
Traceback (most recent call last):
File "/snap/nextcloud/13144/lib/python2.7/site-packages/certbot/renewal.py", line 450, in
handle_renewal_request
main.renew_cert(lineage ._config, plugins, renewal_candidate)
File "/snap/nextcloud/13144/lib/python2.7/site-packages/certbot/main.py", line 1192, in renew_cert
renewed_lineage = _get_and_save_cert(le_client, config, lineage=lineage)
File "/snap/nextcloud/13144/lib/python2.7/site-packages/certbot/main.py", line 115, in _get_and_save_cert
renewal.renew_cert(config, domains, le_client, lineage)
File "/snap/nextcloud/13144/lib/python2.7/site-packages/certbot/renewal.py", line 315, in renew_cert
lineage.save_successor(prior_version, new_cert, new_key.pem, new_chain, config)
File "/snap/nextcloud/13144/lib/python2.7/site-packages/certbot/storage.py", line 1111, in save_successor
os.chown(target["privkey"], -1, os.stat(old_privkey).st_gid)
OSError: [Errno 1] Operation not permitted: '/var/snap/nextcloud/current/certs/certbot/config/archive/loft-nextcloud.loft.aero/privkey3.pem'
2019-05-15 03:56:35,793:ERROR:certbot.renewal:All renewal attempts failed. The following certs could not be renewed:
2019-05-15 03:56:35,794:ERROR:certbot.renewal: /var/snap/nextcloud/current/certs/certbot/config/live/loft-nextcloud.loft.aero/fullchain.pem (failure)