• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue chrooted SSH access does not work after migration

Aileron79

New Pleskian
Hi all!
I have successfully migrated from an old server to a new machine running Plesk Onyx 17.8.11 using the provided migration tools. Now customers complain that they cannot log in via ssh. They usually have chrooted SSH access. This is what happens when they try to log in:

user with id=10003 and name=xxxxxxxx not found in chrooted passwd file
system error: No such file or directory
Connection to www.xxxxxxxx.com closed.

Now I tried to troubleshoot this issue with one test customer, so I granted regular (un-chrooted) SSH access, which worked fine. When I changed back to /bin/bash (chroot), Plesk confronted me with a series of error messages:

System user update is failed: chrootmng failed: open_basedir_with_nofollow: opeat failed: `vhosts',
Not a directory chrootmng: cannot create directory "/var/www/vhosts/xxxxxxxx.com/bin":
Not a directory open_basedir_with_nofollow: opeat failed: `vhosts',
Not a directory chrootmng: cannot create directory "/var/www/vhosts/xxxxxxxx.com/dev":
Not a directory open_basedir_with_nofollow: opeat failed: `vhosts',
Not a directory chrootmng: cannot create directory "/var/www/vhosts/xxxxxxxx.com/etc":
Not a directory open_basedir_with_nofollow: opeat failed: `vhosts',
Not a directory chrootmng: cannot create directory "/var/www/vhosts/xxxxxxxx.com/lib":
Not a directory open_basedir_with_nofollow: opeat failed: `vhosts',
Not a directory chrootmng: cannot create directory "/var/www/vhosts/xxxxxxxx.com/lib64":
Not a directory open_basedir_with_nofollow: opeat failed: `vhosts',
Not a directory chrootmng: cannot create directory "/var/www/vhosts/xxxxxxxx.com/tmp":
Not a directory open_basedir_with_nofollow: opeat failed: `vhosts',
Not a directory chrootmng: cannot create directory "/var/www/vhosts/xxxxxxxx.com/usr":
Not a directory open_basedir_with_nofollow: opeat failed: `vhosts',
Not a directory chrootmng: cannot create directory "/var/www/vhosts/xxxxxxxx.com/var":
Not a directory open_basedir_with_nofollow: opeat failed: `vhosts',
Not a directory open_basedir_with_nofollow failed setup_chroot: unlink old {root}/etc/group failed System error 20: Not a directory

The only thing that comes to my mind that I could relate to this issue is the fact that the vhosts directory is a symlink as it is located on another partition. This has not caused any other problems so far. I don't expect this to cause any issues with the chrooted environments as the whole domain directories, including the chroot jails, are supposed to completely be inside the vhosts directory - with no more symlinks in the lower directory structure.

Any suggestions on how to resolve this issue?
 
Ok, seems as I have resolved the issue by replacing the symlink with a bind mount. Still need to disable and re-enable the chroot env for each customer via Plesk.
 
Ok, seems as I have resolved the issue by replacing the symlink with a bind mount. Still need to disable and re-enable the chroot env for each customer via Plesk.
Thanks, this is the only solution worked for me on Centos 8, changing chroot to sh shell then to bash chroot again, this is a bug! Please Plesk team fix this?
 
Back
Top