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

shell

Discussion in 'Plesk for Linux - 8.x and Older' started by dericknwq, Jan 24, 2007.

  1. dericknwq

    dericknwq Guest

    0
     
    How do I make more commands available to users in Shell?

    Currently only a small amount of commands are available to Shell users. I would like to add in wget or lynx for them. How can I do so? Thank you.
     
  2. tnats@

    tnats@ Guest

    0
     
    Give them something like /bin/bash
    in the "Shell access to server with FTP user's credentials"
     
  3. tnats@

    tnats@ Guest

    0
     
  4. tnats@

    tnats@ Guest

    0
     
  5. dericknwq

    dericknwq Guest

    0
     
    The thing is I wanted a chrooted shell instead of having the user able to cd around the server.

    If Shell is set to /bin/bash, the user can even run commands like rpm and locate etc. I don't wish to have that happening. Rather I would like to have commands like tar, wget available in the chroot environment.

    I am not sure if it is alright to just copy the /bin/wget into /var/www/vhosts/chroot/bin
     
  6. tnats@

    tnats@ Guest

    0
     
    Here ya go:
    http://kb.swsoft.com/article_16_818_en.html

    Chrooted shell provides limited functionality only, it only allows to
    use very common commands such as `cp`, `mv`, `mkdir` and so on. `tar` is not included into chrooted shell as well as a lot of other system
    utilities. You can check /home/httpd/vhosts/chroot for details.

    If you want to add more files to chroot for all the domains, you can copy
    them to the appropriate subfolder in /home/httpd/vhosts/chroot and run two
    commands:

    /usr/local/psa/admin/sbin/chrootmng --remove --source=/home/httpd/vhosts/chroot --target=all

    /usr/local/psa/admin/sbin/chrootmng --create --source=/home/httpd/vhosts/chroot --target=all
     
  7. tnats@

    tnats@ Guest

    0
     
    Hmm, I just tried this with wget and I get this now:
    bash-2.05b$ wget
    wget: error while loading shared libraries: libssl.so.0.9.7: cannot open shared object file: No such file or directory
     
  8. dericknwq

    dericknwq Guest

    0
     
    Oh ok, thanks! Isn't there a better Plesk documentation, the knowledge base still doesn't really explain what the command does etc. There should be a pro plesk administrator documentation. :D
     
  9. tnats@

    tnats@ Guest

    0
     
    If you get it work, let me know. My wget doesn't work.
     
  10. dericknwq

    dericknwq Guest

    0
     
    You will need to copy the require libs into the chroot/lib folder as well.

    Here is what I did
    Code:
    cp /lib/libssl.so.* /var/www/vhosts/chroot/lib/
    Then just recreate using chrootmng.
     
  11. tnats@

    tnats@ Guest

    0
     
    it works, thanks!
     
Loading...