Symptoms
-
Chrooted directories exist in the subscription’s directory on a Plesk for Linux server:
# ls -la /var/www/vhosts/example.com/
drwx–x— 13 user psaserv 4096 Apr 24 10:02 .
drwxr-xr-x 546 root root 20480 Apr 24 10:00 ..
drwxr-xr-x 2 root root 4096 Apr 24 10:02 bin
drwxr-xr-x 2 root root 4096 Apr 24 10:02 dev
drwxr-xr-x 2 user psacln 4096 Apr 24 10:00 error_docs
drwxr-xr-x 2 root root 4096 Apr 24 10:02 etc
drwxr-x— 5 user psaserv 4096 Apr 24 10:00 httpdocs
drwxr-xr-x 3 root root 4096 Apr 24 10:02 lib
drwxr-xr-x 2 root root 4096 Apr 24 10:02 lib64
drwx—— 2 user root 4096 Apr 24 10:00 logs
drwxrwxrwt 2 root root 4096 Apr 24 10:02 tmp
drwxr-xr-x 3 root root 4096 Apr 24 10:02 usr
drwxr-xr-x 3 root root 4096 Apr 24 10:02 var -
In Plesk interface, the option Access to the server over SSH is set to Forbidden in Domains > example.com > Web Hosting Access.
-
The option Crontab shell is set to /bin/bash (chrooted) in Tools & Settings > Scheduled Tasks > Settings:
-
In the Plesk configuration database
psa
in the tablemisc
, the parametercrontab_secure_shell_compatibility_mode
is not enabled:# plesk db
MariaDB [psa]> select param, val from misc where param = ‘crontab_secure_shell_compatibility_mode’;
Empty set (0.00 sec)
Cause
Chrooted directories were created by the scheduled task of the domain with the type Run a command.
Resolution
-
Go to Tools & Settings > Scheduled Tasks (Cron jobs) > Settings.
- Set the option Crontab shell as /bin/sh and click OK or Apply to save the changes.
Directly on the server
-
Connect to the server using SSH.
-
Delete chrooted directories for the subscription example.com:
# plesk sbin chrootmng –remove –target=/var/www/vhosts/example.com –source=/var/www/vhosts/chroot