• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Error when removing SSL Cert

Thomas Spellman

New Pleskian
When I try to remove an SSL Cert from the Server Management -> Tools and Settings -> SSL Certificates page, I get the following error:

Unable to remove SSL certificates.
Unable to delete certificate: SSLCertificate::clearCACert() failed: Unable to remove CA certificate file: remove_files failed: Deleting only Plesk and temporary files usage: rm [-f | -i] [-dPRrvW] file ... unlink file

Screen Shot 2016-11-02 at 12.28.35 PM.png
 
Looks like that you have some kind of customization in directories structure and place where certificate is located just symlink but not real directory. Check and correct it.
 
It looks like all the certs are stored in /opt/psa/var/certificates. Here's a listing of that folder with permissions. Does anything look wrong?

root@sol:/opt/psa/var/certificates# ls -la
total 836
drwxr-xr-x 2 root root 4096 Oct 25 10:27 .
drwxr-xr-x 11 psaadm psaadm 4096 Oct 24 06:29 ..
-r-------- 1 root root 6145 Nov 2 2015 cert-01bFwf
-r-------- 1 root root 4023 Oct 8 2015 cert-0LkN4S
-r-------- 1 root root 4064 Nov 2 2015 cert-1eO6rX
-r-------- 1 root root 8997 Oct 15 2015 cert-1LlUAr

...
 
When I go into mysql and do a query for the cert in question, this is the result:

mysql> select id, cert_file, ca_file from certificates where name = "my cert name";
+----+-------------+-------------+
| id | cert_file | ca_file |
+----+-------------+-------------+
| 5 | cert-oJRd9M | cert-F80mwK |
+----+-------------+-------------+

When I look at those files this is their perms:

root@sol:/opt/psa/var/certificates# ls -l cert-F80mwK
-r-------- 1 root root 4973 Oct 15 2015 cert-F80mwK

root@sol:/opt/psa/var/certificates# ls -l cert-oJRd9M
-r-------- 1 root root 8997 Oct 15 2015 cert-oJRd9M

Even if I change the ownership and perms of the files, I still get the error:

root@sol:/opt/psa/var/certificates# chown psaadm: cert-F80mwK
root@sol:/opt/psa/var/certificates# chown psaadm: cert-oJRd9M
root@sol:/opt/psa/var/certificates# chown psaadm: .
root@sol:/opt/psa/var/certificates# chmod 666 cert-oJRd9M
root@sol:/opt/psa/var/certificates# chmod 666 cert-F80mwK


Part of the problem is that the error gives no specific info about which file in particular it's having trouble deleting ...

T
 
Last edited:
I tried to list certs using CLI:

Code:
root@sol:~# /usr/local/psa/bin/certificate -l -admin
CSR Priv Cert CA Name                  Used
N   Y    Y    Y  mycert                0

when I try to delete it I get an error:

Code:
root@sol:~# /usr/local/psa/bin/certificate -r "mycert" -admin
[2017-01-08 16:47:55] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/remove_files' '/opt/psa/var/certificates/cert-F80mwK'] with exit code [64]
Error occured while sending feedback. HTTP code returned: 502
Unable to remove certificate mycert: Unable to remove certificates: Unable to delete certificate: SSLCertificate::clearCACert() failed: Unable to remove CA certificate file: remove_files failed: Deleting only Plesk and temporary files
usage: rm [-f | -i] [-dPRrvW] file ...
      unlink file

I could really use a hint here about how I can proceed. IgorG mentioned symlinks, but I'm unsure how it's supposed to be. This is on Ubuntu 14.0.4.
 
Back
Top