Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 10 of 10

This is a discussion on chrooted accounts in the VPS & Dedicated forum
I am new to having a vps account and have setup some domains that have chrooted accounts through plesk. I was wondering how to give ...

  1. #1
    JPC Member
    Join Date
    Jan 2008
    Location
    Oklahoma City
    Posts
    6

    chrooted accounts

    I am new to having a vps account and have setup some domains that have chrooted accounts through plesk. I was wondering how to give these accounts the ability to use programs like tar, wget etc...through ssh. These are programs that are already installed on the VPS that non-chrooted accounts have access to. Just wondering what the safest, easiest way to achieve this is.

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Have you checked to confirm that they DON'T have access already? I have no experience with Plesk, but usually when you let a control panel make the chrooted environment for the account it puts all of that stuff in there by default.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    JPC Member
    Join Date
    Jan 2008
    Location
    Oklahoma City
    Posts
    6
    Quote Originally Posted by jason View Post
    Have you checked to confirm that they DON'T have access already? I have no experience with Plesk, but usually when you let a control panel make the chrooted environment for the account it puts all of that stuff in there by default.

    --Jason
    Yeah, I figured that they would have access to basic commands but was shocked that basic commands like "tar" return "command not found." Who the heck knows.

  4. #4
    JPC Member
    Join Date
    Jan 2006
    Posts
    48
    If you look at /var/www/vhosts/chroot/bin, you'll find all the commands the chroot environment has available. If you want to add a new one, you'll have to add all the libraries the binary depends on to /var/www/vhosts/chroot/lib before it will run in the jailshell (you can find these dependencies by running ldd path/to/binary). Then, you'll have to change the user's shell to something then back to chroot for the effects to take place (or copy everything you did to their home directory copies of bin and lib). I've been able to add svn and mysql to the chroot this way.

  5. #5
    JPC Member
    Join Date
    Jan 2008
    Location
    Oklahoma City
    Posts
    6
    Quote Originally Posted by impleri View Post
    ...If you want to add a new one, you'll have to add all the libraries the binary depends on to /var/www/vhosts/chroot/lib before it will run in the jailshell (you can find these dependencies by running ldd path/to/binary).
    So this means that for every chrooted account I am going to have to duplicate these files? If so that sucks butts.

    Is it possible create these files in the chrooted account as symbolic links? That way I could create a single directory that all chroot accounts could access via symbolic links. I know very little about jailshell but I am betting this can't be done.

  6. #6
    JPC Member
    Join Date
    Jan 2008
    Location
    Oklahoma City
    Posts
    6
    I am retarded and have had a few too many to drink. Alcohol + forums = bad news.

    I just reread your post and realize that ALL chroot accounts will have access to the libraries installed in the /var/www/vhosts/chroot/lib directory.

    Appreciate your help!!

  7. #7
    all about nothing! Frank Broughton's Avatar
    Join Date
    Jan 2006
    Posts
    2,158
    Alcohol + anything but a shot in the arm equals bad news. Or is is good for cleaning ink off of things too.

  8. #8
    JPC Member
    Join Date
    Jan 2008
    Location
    Oklahoma City
    Posts
    6
    Quote Originally Posted by Frank Broughton View Post
    Alcohol + anything but a shot in the arm equals bad news.
    You got me! Repenting now...

  9. #9
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Use hard links to the existing programs/libraries in chroot/bin and chroot/lib instead of installing the software a second time. That way you won't have to worry about making updates in two places in the future and you will have zero extra disk usage.

    Code:
    ln /original/path/to/file
    (Note there is no -s (symbolic) flag on there.)

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  10. #10
    all about nothing! Frank Broughton's Avatar
    Join Date
    Jan 2006
    Posts
    2,158
    Quote Originally Posted by ChimRichalds View Post
    You got me! Repenting now...
    haha ..... sure ya are......

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •