• 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

deleted chroot dir in vhosts help!

R

rayirwin

Guest
I accidentally deleted the /home/httpd/vhosts/chroot dir on my plesk server. I must be crazy, but somehow I managed to pull it off. My websites are still online, but when I try to use the control panel to setup a new domain with physical hosting i get the following error:

Unable to update hosting preferences: hosting update failed: vhostmng: /usr/local/psa/admin/bin/chrootmng execution failed:
chrootmng: opendir(/home/httpd/vhosts/chroot)failed
System error 2: No such file or directory
vhostmng: Cannot create chrooted environment

can someone please tell me there is a quick and simple solution for my problem?

how do i restore the .../vhosts/chroot dir from scratch??

i'm running plesk 7.5.4. on a suse 9.3 os.

any suggestions are more than welcome

happy holidays, r
 
Hey, it could be not so bad as it seems. In fact, what you need now is to copy the files from the similar server with Plesk 7.5.4 on a SUSE 9.3 to your chroot folder (afterall, you could take your Plesk distribution and install it on some SUSE machine, and take the files from there).

Moreover, on my Plesk 7.5.4 machine the vhost/chroot directory has a different location:
/var/www/vhosts/chroot/

Can you please check if you have any subdirs there ?
> ls -la /var/www/vhosts/chroot/
total 32
drwxr-xr-x 8 root root 4096 Sep 19 13:08 .
drwxr-xr-x 6 root root 4096 Sep 19 14:13 ..
drwxr-xr-x 2 root root 4096 Sep 19 13:09 bin
drwxr-xr-x 2 root root 4096 Sep 19 13:09 etc
drwxr-xr-x 2 root root 4096 Sep 19 13:09 lib
drwxrwxrwt 2 root root 4096 Sep 19 13:08 tmp
drwxr-xr-x 5 root root 4096 Sep 19 13:09 usr
drwxr-xr-x 3 root root 4096 Sep 19 13:08 var

If so, you could try copying the subdirs\files recursively from there to your /home/httpd/vhosts/chroot.

BTW, the fact that you are using /home/httpd/vhosts directory is asking for a question where do you keep your actual vhosts, because by default Plesk configuration (/etc/psa/psa.conf) is targeted around /var/www/vhosts:

# Virtual hosts directory
HTTPD_VHOSTS_D /var/www/vhosts

If it really is so in your /etc/psa/psa.conf, you may want to decide which host directory suits you the most, and remain with this hosts directory only to avoid further misconfiguration problems. You can manually adjust your configuration files to point at /var/www/vhosts. If you require another host directory, there is a special utility supplied within Plesk to transfer vhosts content from HTTPD_VHOSTS_D directory to a new place:
> /usr/local/psa/bin/transvhosts.pl --help
With the --correct-scripts option, it can even change user scripts, replacing old vhost path with a new path in all files.

Hope it helps a bit.
 
Hey, it could be not so bad as it seems. In fact, what you need now is to copy the files from the similar server with Plesk 7.5.4 on a SUSE 9.3 to your chroot folder (afterall, you could take your Plesk distribution and install it on some SUSE machine, and take the files from there).

Moreover, on my Plesk 7.5.4 machine the vhost/chroot directory has a different location:
/var/www/vhosts/chroot/

Can you please check if you have any subdirs there ?
> ls -la /var/www/vhosts/chroot/
total 32
drwxr-xr-x 8 root root 4096 Sep 19 13:08 .
drwxr-xr-x 6 root root 4096 Sep 19 14:13 ..
drwxr-xr-x 2 root root 4096 Sep 19 13:09 bin
drwxr-xr-x 2 root root 4096 Sep 19 13:09 etc
drwxr-xr-x 2 root root 4096 Sep 19 13:09 lib
drwxrwxrwt 2 root root 4096 Sep 19 13:08 tmp
drwxr-xr-x 5 root root 4096 Sep 19 13:09 usr
drwxr-xr-x 3 root root 4096 Sep 19 13:08 var

If so, you could try copying the subdirs\files recursively from there to your /home/httpd/vhosts/chroot.

BTW, the fact that you are using /home/httpd/vhosts directory is asking for a question where do you keep your actual vhosts, because by default Plesk configuration (/etc/psa/psa.conf) is targeted around /var/www/vhosts:

# Virtual hosts directory
HTTPD_VHOSTS_D /var/www/vhosts

If it really is so in your /etc/psa/psa.conf, you may want to decide which host directory suits you the most, and remain with this hosts directory only to avoid further misconfiguration problems. You can manually adjust your configuration files to point at /var/www/vhosts. If you require another host directory, there is a special utility supplied within Plesk to transfer vhosts content from HTTPD_VHOSTS_D directory to a new place:
> /usr/local/psa/bin/transvhosts.pl --help
With the --correct-scripts option, it can even change user scripts, replacing old vhost path with a new path in all files.

Hope it helps a bit.

Hi Hedgren,

thanks for your tips. I checked the /var/www/vhosts directory, but it only contains a symbolic link to the /home/httpd/vhosts directory. There, of course, the chroot directory is missing entirely and evidently does not contain any subdirs.

I will try to intall plesk on a similiar machine and copy the files from there. Maybe that will work.

Thanks again for your reply.

Raymond
 
Back
Top