Category: Plesk

  • Fixing Plesk Process Hang Caused by Missing or Broken filemng Binary

    Fixing Plesk Process Hang Caused by Missing or Broken filemng Binary

    Fixing the Plesk filemng Problem: Missing or Broken Binary

    If you ever encountered a situation where Plesk-related operations like backups, extension uninstallations, or file operations hang indefinitely, the root cause could be a broken or missing filemng binary. In this article, we’ll explain why it happens, how to diagnose it, and how to fix it by manually extracting the correct binary from a Plesk RPM package.


    What Is filemng in Plesk?

    The filemng tool is a critical internal Plesk binary responsible for secure file operations under the correct user permissions. Virtually every file or directory manipulation within Plesk (for example, during backups, migrations, or UI file management) uses filemng under the hood.

    If filemng is missing or corrupted, you will experience:

    • Hanging backup tasks
    • Failed extension uninstalls
    • Stuck migrations
    • Inability to manage hosting files properly

    Symptoms of a filemng Issue

    • Backups hang forever.
    • Commands like /usr/local/psa/admin/bin/filemng root file_exists /path/to/file never complete.
    • Manual execution of filemng returns errors like:
    filemng: execve failed: No such file or directory
    System error 2
    • Errors during Plesk repair procedures:
    Expected and actual types of file '/usr/local/psa/admin/sbin/filemng' do not match: file != symlink.

    Why Does This Happen?

    Normally, /usr/local/psa/admin/sbin/filemng should be a symlink to /opt/psa/admin/sbin/filemng. If the target binary is missing or the symlink is broken, Plesk tasks will break.

    This can happen due to:

    • Incomplete Plesk updates
    • Accidental file deletion
    • Filesystem corruption
    • Faulty RPM packaging in some rare Plesk builds

    How to Fix the filemng Problem

    Here’s the complete recovery guide:

    Step 1: Confirm the Problem

    Check if filemng exists:

    ls -lh /usr/local/psa/admin/sbin/filemng

    If the binary or symlink is missing or broken, proceed.


    Step 2: Download the Correct RPM

    Download a working version of plesk-service-node-utilities, which includes filemng.

    Example for Plesk 18.0.59 (CentOS 7):

    wget https://autoinstall.plesk.com/PSA_18.0.68/dist-rpm-CentOS-7-x86_64/base/plesk-service-node-utilities-18.0-2.centos.7+p18.0.68.2+t250319.0858.x86_64.rpm

    Step 3: Extract the filemng Binary

    Create a folder to extract contents:

    mkdir /root/unpacked_filemng
    cd /root/unpacked_filemng

    Extract the RPM content:

    rpm2cpio plesk-service-node-utilities-18.0-2.centos.7+p18.0.68.2+t250319.0858.x86_64.rpm | cpio -idmv

    Locate the extracted filemng:

    ls -lh ./usr/local/psa/admin/sbin/filemng

    Step 4: Copy the Binary to the Correct Location

    If the binary exists in the unpacked folder, copy it:

    rm -f /usr/local/psa/admin/sbin/filemng
    cp ./usr/local/psa/admin/sbin/filemng /usr/local/psa/admin/sbin/filemng 
    chmod 755 /usr/local/psa/admin/sbin/filemng 
    chown root:root /usr/local/psa/admin/sbin/filemng

    Ensure correct permissions and ownership.


    Step 6: Restart Plesk Services

    Finally, restart Plesk services to reinitialize the environment:

    systemctl restart psa
    systemctl restart sw-engine
    systemctl restart sw-cp-server

    Final Test

    Now you can test filemng manually:

    echo "test" > /usr/local/psa/tmp/testfile.txt
    
    /usr/local/psa/admin/bin/filemng root file_exists /usr/local/psa/tmp/testfile.txt --allow-root

    If it returns 0, it means everything works!


    Conclusion

    A missing or broken filemng binary can cripple your Plesk server’s basic functionalities.
    By extracting it from the correct RPM package and restoring it manually, you can fully recover the system without requiring a full Plesk reinstall.

    If you found this guide helpful, consider bookmarking it — these low-level fixes can save you a lot of downtime in future emergencies!