• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

/bin/bash (chrooted) no longer available and chrooted users no longer able to login

P

pixoul

Guest
I've got a bit of weirdness that I can't figure out. I tried to login to a chrooted account on my server via SSH this evening (Plesk 7.5 Reloaded on RHEL ES 4) and got the following error. Username replaced with xxxx:

Code:
yump:~ sean$ slogin [email][email protected][/email]
[email][email protected][/email]'s password: 
execv("/bin/bash") failed
system error: Permission denied
Connection to colo1.pixoul.com closed.

I logged in as root and checked out /etc/passwd; everything looks normal:

Code:
xxxx:x:xxxx:xxxx::/var/www/vhosts/pixoul.com:/usr/local/psa/bin/chrootsh

But in the Physical hosting setup page /bin/bash (chrooted) is no longer an option! So none of my chrooted users can login (see attached image).

nochroot.png


Here's a log excerpt:

Code:
==> messages <==
Mar  4 01:15:50 colo1 sshd(pam_unix)[22371]: session opened for user pixoulcom by (uid=0)
Mar  4 06:15:50 colo1 plesk-chrootsh[22373]: execv("/bin/bash") failed
Mar  4 06:15:50 colo1 plesk-chrootsh[22373]: system error: Permission denied

==> secure <==
Mar  4 01:15:50 colo1 sshd[22369]: Accepted password for xxxx from ::ffff:66.92.69.252 port 63146 ssh2
Mar  4 01:15:50 colo1 sshd[22371]: Setting tty modes failed: Invalid argument

==> messages <==
Mar  4 01:15:50 colo1 sshd(pam_unix)[22371]: session closed for user xxxx

Any ideas? :(
 
I seem to have found my problem. Somehow all the files in the following directories lost their execute bit:

Code:
/var/www/vhosts/*/bin
/var/www/vhosts/*/lib
/var/www/vhosts/*/usr/libexec

I solved the problem by running:

Code:
cd /var/www/vhosts/
for dir in *; do chmod +x $dir/bin/* $dir/lib/* $dir/usr/libexec/openssh/sftp-server; done

Do you guys know of any reason why every single chroot directory would have lost its execute bit? Is there some rogue cleanup script that runs that may have fragged thing? :(
 
Pixoul, did this make your "/bin/bash (chrooted)" re-appear?

I am having the same problem under Plesk 8.1.0.
 
Back
Top