Articles in this section

Error in Plesk: SWKeyExFatalError: "Cannot open file" or "Permission denied"

Plesk for Linux kb: technical ABT: Group A

Applicable to:

  • Plesk for Linux

Symptoms

  • When logging in to Plesk or browsing pages in Plesk, one of the following error messages appears:

    PLESK_INFO: Type: SWKeyExFatalError
    Message: error: Cannot open file: /etc/sw/keys/info

    PLESK_INFO: Type GraphQL Error
    Message Internal server error


    PLESK_INFO: Type: SWKeyExFatalError
    Message: error: Cannot create: /etc/sw/keys/lock/repository: Permission denied

  • Plesk license installation fails with:

    PLESK_INFO: mkstemp failed: /etc/sw/keys/keys/keyXXXXXX: Permission denied (Error code: 2)

Cause

Permissions on the directory /etc/sw/keys or its subdirectories are incorrect.

Resolution

  1. Connect to the Plesk server via SSH.

  2. Fix permissions with this command:

    # /usr/sbin/usermod -a -G swkey-data psaadm && chown -R root:swkey-data /etc/sw/keys/ && chmod -R 660 /etc/sw/keys/* && chmod -R 644 /etc/sw/keys/info && find /etc/sw/keys -type d -exec chmod 2770 {} \; && chmod 4510 /etc/sw/keys/restart/* && chown -R psaadm:swkey-data /etc/sw/keys/registry.xml /etc/sw/keys/keys/*

  3. Restart the Plesk services:

    # systemctl restart sw-engine && systemctl restart sw-cp-server

  4. Retrieve the Plesk license:

    # plesk bin license --retrieve

    If the retrieval operation fails, log in to Plesk and install your Plesk license by clicking Install Key.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.