• 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

Resolved Restore /var/www/vhosts/chroot/ permissions

dalydesign

Basic Pleskian
Yesterday my Cron Jobs started failing withe the following error:

execv("/bin/bash") failed
system error: Permission denied

Likewise I am unable to log in to the virtual hosts files using SFTP it refuses to let any virtual host user connect using SFTP, however I can connect using FTP and I can connect to the server using SFTP using my root account.

In addition to this, in plesk, '/bin/bash (Chroot)' is missing from the Access to the server over SSH drop down list. If I change the domain name user's password, it gives the error: "Error: No secure shell available"

I discovered that in most files in /var/www/vhosts/chroot/ have permissions of 644 and folders were 755

I was then told by my colleague that he mistakingly set the file and folder permissions (recursively) of the /var/www/vhosts/mydomain folder to 644and 755 instead of doing it in /var/www/vhosts/mydomain/httpdocs.

he used this...
find . -type f \-exec chmod 644 {} \;
find . -type d \-exec chmod 755 {} \;
so when I investigated, I saw that the files and folders in /var/www/vhosts/chroot/ have incorrect permissions.

using SSH, I have executed the command "plesk repair fs -y" and this has not fixed it.

Can anyone help!

(Running Plesk 12.5)
 
This fixed it:
Connect to server using ssh and enter the following:

(Fixes the file permissions)
Code:
# Plesk rebuild fs -y

(Then re-build the chroot templates: as per this kb article: How to rebuild chroot template? )
Code:
# wget https://support.plesk.com/hc/en-us/article_attachments/360009607573/update_chroot.tar.gz
# tar -xvzf update_chroot.tar.gz
# ./update_chroot.sh --update
 
Back
Top