• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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