• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Error in Plesk when activating DKIM [Permission issue]

dantak

New Pleskian
Server operating system version
Ubuntu 22.04.3 LTS
Plesk version and microupdate number
Plesk Obsidian 18.0.58
How fix this error?

Error: Failed to get DKIM public key: filemng: Failed to change directory to /etc/domainkeys/napfcheck-shop.de: Permission denied
System error 13: Permission denied

This error shows when i wanna activate it in a domain.

It a new installed system with Plesk Obsidian 18.0.58,

I also never can see the public key for external DNS as I should. It's empty.

Permissions and default file in /etc/domainkeys are right.

It possible to save "DKIM active" sometimes, but in send emails there is no DKIM signature. On other PLESK server the same configuration does work without problems.

Please help, what can I do?
 
Please manually delete /etc/domainkeys/napfcheck-shop.de, and then re-enable DKIM in the domain mail configuration.
 
After your hint the error
Error: Failed to get DKIM public key: filemng: Failed to change directory to /etc/domainkeys/napfcheck-shop.de: Permission denied
System error 13: Permission denied
will not come again

but the external DNS entry for DKIm is still empty, Sent email also have no DKIM signatures, even when DKIM button is active.

I also deactivated DKIM on serverbasis and enabled it again, but configuration of external server DND ist still empty, even when it's written copy the text below.

I is a new setup server with Plesk Obsidian 18.0.58 by STRATO. Is the version ok or may I downgrade somehow?
 
Please manually delete /etc/domainkeys/napfcheck-shop.de, and then re-enable DKIM in the domain mail configuration.
After your hint the error
Error: Failed to get DKIM public key: filemng: Failed to change directory to /etc/domainkeys/napfcheck-shop.de: Permission denied
System error 13: Permission denied
will not come again

but the external DNS entry for DKIm is still empty, Sent email also have no DKIM signatures, even when DKIM button is active.

I also deactivated DKIM on serverbasis and enabled it again, but configuration of external server DND ist still empty, even when it's written copy the text below.

I is a new setup server with Plesk Obsidian 18.0.58 by STRATO. Is the version ok or may I downgrade somehow?
 
Please uncheck DKIM on that domain and save. Then check it again and save. The DKIM informational dialog should show the keys then.
 
Please uncheck DKIM on that domain and save. Then check it again and save. The DKIM informational dialog should show the keys then.
This does not work in my case. I attached 4 screenshots. After step 3, the "failed xx directory error comes again". No problem I delete the folder, but when I activate DKIM again the message is green but the DNS configuration is still empty. THe DKIM key is stored correctly and I can also make the public key out of it, but the information is not there and the worse is that an email sent now has no DKIM in the header, even if DKIM is aktive in the panel.

I can do this on both domains on the server. Never get a DNS configuration.

What to try now?

3.PNG
 

Attachments

  • 4.PNG
    4.PNG
    103.4 KB · Views: 14
  • 1.PNG
    1.PNG
    97.1 KB · Views: 10
  • 2.PNG
    2.PNG
    103 KB · Views: 7
In addition the PLESK backup is throwing these errors this night.

WARNING: (Mail object 'in-d22.de') Unable to back up domain keys. Error: Failed to get DKIM public key: filemng: Failed to change directory to /etc/domainkeys/in-d22.de: Permission denied

System error 13: Permission denied


WARNING: (Mail object 'napfcheck-shop.de') Unable to back up domain keys. Error: Failed to get DKIM public key: filemng: Failed to change directory to /etc/domainkeys/napfcheck-shop.de: Permission denied

System error 13: Permission denied
 
Permissions and default file in /etc/domainkeys are right.

Let's verify that the permissions of /etc/domainkeys are indeed correct. They should look like this:

drwxr-xr-x. 12 root root 4096 Jan 12 20:24 domainkeys
or this
drwxr-xr-x 12 root root 4096 Jan 12 20:24 domainkeys

Meaning:
# chmod 0755 /etc/domainkeys
# chown root:root /etc/domainkeys
The same applies to all files in /etc/domainkeys (but not the DKIM content files IN the directories under /etc/domainkeys, these would be root : popuser and 0640).

Is this the situation on your server?
 
Last edited:
You solved it. The permission on

/etc/domainkeys was 750

it should be 755

The first PLESK installation was making the /etc/domainkeys to 750. It was not me.

I do not know if this will be the case next time, with a complete new istallation, but changing it later is alright for me.

Many thanks, good support!
 
Back
Top