• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

/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