1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

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

Discussion in 'Plesk for Linux - 8.x and Older' started by pixoul, Mar 3, 2006.

  1. pixoul

    pixoul Guest

    0
     
    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]xxxx@colo1.pixoul.com[/email]
    [email]xxxx@colo1.pixoul.com[/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).

    [​IMG]

    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? :(
     
  2. pixoul

    pixoul Guest

    0
     
    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? :(
     
  3. thatha

    thatha Guest

    0
     
    Pixoul, did this make your "/bin/bash (chrooted)" re-appear?

    I am having the same problem under Plesk 8.1.0.
     
Loading...