Articles in this section

Unable to swap domain and domain alias names: boost::filesystem::filesystem_error Directory not empty

Plesk for Linux kb: technical ABT: Group A

Applicable to:

  • Plesk for Linux

Symptoms

  • Unable to swap domain and domain alias names in Plesk with the error below: 

    PLESK_ERROR: Error: mailmng-core failed: mailmng[23434]: Mail directory /var/qmail/mailnames/example.com already exists

  • The following can be found in /var/log/plesk/panel.log:

    CONFIG_TEXT: ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/mailmng-core' '--rename-domain' '--old-domain-name=domain-example.com' '--new-domain-name=alias-example.com'] with exit code [1]
    ERR [1] '/opt/psa/admin/bin/mailmng-core' '--rename-domain' '--old-domain-name=domain-example.com' '--new-domain-name=alias-example.com' failed with code 1. stdout: Fatal error: boost::filesystem::filesystem_error(boost::filesystem::rename: Directory not empty: "/var/qmail/mailnames/domain-example.com", /var/qmail/mailnames/alias-example.com)

Cause

Mail directory for the alias is not empty.

Resolution

In order to archive the goal to swap domain and domain alias names remove incorrect folder for alias:

  1. Connect to the server via SSH.

    Note: Let's assume that domain-example.com is a domain name and alias-example.com is an alias.

  2. Move current mailnames folder for alias to another directory as a backup:

    # mv /var/qmail/mailnames/alias-example.com/ ~/alias-example.com/

  3. If /var/qmail/mailnames/domain-example.com does not exist, copy backed up mail directory:

    # mkdir /var/qmail/mailnames/domain-example.com
    # cp -p ~/alias-example.com/* /var/qmail/mailnames/domain-example.com/

  4. Rename the domain.

Additional information

Unable to rename a domain: mailmng-outgoing failed: ERROR:outgoing:No backend DB entries were modified

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.