Plesk

Unable to create a file or directory under some specific domain folder in Plesk: This directory is read-only: you can not create files or directories in it

Symptoms

Cause

Incorrect permissions or/and ownership on the affected folder.

Resolution

  1. Connect to the server via SSH.

  2. Execute the following command below to fix permissions and ownership automatically. Mind replacing the example.com domain name in the command below with the affected one:

    # plesk repair fs example.com

It may be required to fix permissions/ownership manually. For this follow the steps below:

Manual solution

  1. Connect to the server via SSH.

  2. Execute the command below to obtain the example.com's system user. In the example below it is johndoe:

    # plesk db -N -e "select login from sys_users where home like '%example.com%' and mapped_to is NULL"
    johndoe

  3. Set the correct permissions or/and ownership to the affected folder:

    # chown johndoe:psacln /var/www/vhosts/example.com/error_docs
    # chmod 755 /var/www/vhosts/example.com/error_docs

Exit mobile version