Autoinstaller fails with the "Unable to create 'dirty' flag: No such file or directory" error

Created:

2016-11-16 13:10:09 UTC

Modified:

2017-08-08 13:36:44 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Autoinstaller fails with the "Unable to create 'dirty' flag: No such file or directory" error

Applicable to:

  • Plesk 12.0 for Linux

Symptoms

An attempt to run /usr/local/psa/admin/sbin/autoinstaller fails with the following error:

Unable to create 'dirty' flag (/usr/local/psa
/tmp/components_dirty_flag): No such file or directory
System error 2: No such file or directory

However the /usr/local/psa/tmp directory exists:

# ls -ld /usr/local/psa/tmp/
drwxrwxrwt 4 root root 4096 Jun 20 17:43 /usr/local/psa/tmp/

Cause

Corrupted /etc/psa/psa.conf file, most probably it was modified in Windows system and put back to the server.

The autoinstaller needs to open PRODUCT_ROOT_D/tmp but the PRODUCT_ROOT_D defined in /etc/psa/psa.conf has \r\ at the end of the string, therefore operation fails:

open("/usr/local/psa\\r\

/tmp/components_dirty_flag", O_RDONLY|O_CREAT, 0600) = -1 ENOENT (No such file or directory)

Resolution

  1. Check the /etc/psa/psa.conf file using hexdump utility

    # hexdump -C /etc/psa/psa.conf
    00000000 23 0d 0a 23 20 28 63 29 20 43 6f 70 79 72 69 67 |#..# (c) Copyrig|
    00000010 68 74 20 31 39 39 39 2d 32 30 30 38 20 50 61 72 |ht 1999-2008 Par|
    00000020 61 6c 6c 65 6c 73 0d 0a 23 20 41 6c 6c 20 52 69 |allels..# All Ri|
    00000030 67 68 74 73 20 52 65 73 65 72 76 65 64 0d 0a 23 |ghts Reserved..#|
    00000040 0d 0a 23 20 54 68 69 73 20 66 69 6c 65 20 69 73 |..# This file is|
    00000050 20 75 73 65 64 20 74 6f 20 64 65 63 6c 61 72 65 | used to declare|
    ...

    Occurrence of hex 0D 0A (that corresponds to \r\ ) points to the fact that file was modified under Windows system and put back.

  2. Backe up /etc/psa/psa.conf

    # cp /etc/psa/psa.conf{,.broken}

    and use dos2unix command to fix it:

    # dos2unix /etc/psa/psa.conf
    dos2unix: converting file /etc/psa/psa.conf to UNIX format ...
Have more questions? Submit a request
Please sign in to leave a comment.