Applicable to:
- Plesk for Linux
Symptoms
-
Cannot create a file or directory under some specific domain folder, e.g.
error_docs
due to the following warning:PLESK_ERROR: Warning: Add a file to: /error_docs
This directory is read-only: you can not create files or directories in it. -
The following error appears in an attempt to modify files inside the `error_docs` folder:
PLESK_ERROR: Server Error 500 PleskUtilException
filemng failed: file: error occurred during /bin/mkdir command
-
Similar error can be found in the
/var/log/plesk/panel.log
log file:CONFIG_TEXT: stdout:
mkdir: cannot create directory ‘/var/www/vhosts/example.com/error_docs/test_folder’: Permission denied
filemng: Error occurred during /bin/mkdir command.
Cause
Incorrect permissions or/and ownership on the affected folder.
Resolution
-
Connect to the server via SSH.
-
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:
-
Connect to the server via SSH.
-
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 -
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
Comments
0 comments
Please sign in to leave a comment.