- Plesk 12.0 for Linux
- Plesk 12.5 for Linux
Logs directory is not created at the creation of the subdomain. The following error is shown:
PLESK_INFO: System error 2: No such file or directoryWarning: mkdir: cannot create directory `./example.com/logs': File exists ERROR: Cannot relink logs. Target directory '/var/www/vhosts/example.com/logs' is in invalid state.
The following command returns an error:
# /opt/psa/admin/sbin/relink-vhost-logs --domain-name example.com --sys-user-login ftpuser
WARNING during statistics_collector execution: : statistics_collector: Relinking of virtual host logs `/opt/psa/admin/sbin/relink-vhost-logs --domain-name example.com --sys-user-login ftpuser' failed with code 3.
Stderr:'./example.com/logs' already exists, but has wrong access rights. Specify --force to override.
ERROR: Cannot relink logs. Target directory '/var/www/vhosts/example.com/logs' is in invalid state.
has incorrect permissions and ownership.
1. Log in to Plesk server via SSH.
Note: if you don't have root access to Plesk server via SSH, contact your hosting provider regarding the issue
2. Fix the permissions and ownership using Plesk utility (specify actual domain name and FTP user name):
# plesk sbin relink-vhost-logs --domain-name example.com --sys-user-login ftpuser --force
If it does not help, fix the permissions and ownership manually:
# chmod 700 /var/www/vhosts/example.com/logs/
# chown .root /var/www/vhosts/example.com/logs/