Question regarding Jailkit/chroot

Discussion in 'General' started by darkangel, Dec 19, 2011.

  1. darkangel

    darkangel New Member

    Hi,

    At some point I enabled Jailkit and/or chroot which resulted in a number of folders being created for the site, for example "bin", "lib", "usr", etc.

    Question: Is it safe to just delete these folders if I'm not using Jailkit/chroot?

    Thanks.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    you can delete the folders if you dont use any shell users on that website anymore.
     
  3. darkangel

    darkangel New Member

    There is a shell user, but it isn't chrooted. (?)
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You should check in /etc/passwd if really none of the shell users of thst site is chrooted. If no chrooted user isleft, then you can remove the folders.
     
  5. darkangel

    darkangel New Member

    Hmm ...

    web3:x:5005:5006::/var/www/clients/client1/web3/./home/web3:/usr/sbin/jk_chrootsh

    Is it possible to remove that using ISPConfig, or should I do it by manually editing /etc/passwd?
     
  6. darkangel

    darkangel New Member

    Is it possible?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Please change:

    web3:x:5005:5006::/var/www/clients/client1/web3/./home/web3:/usr/sbin/jk_chrootsh

    to:

    web3:x:5005:5006::/var/www/clients/client1/web3:/bin/bash

    manually in /etc/passwd file.
     
  8. darkangel

    darkangel New Member

    Thanks. My other users have "/bin/false", which I think means they can't login via SSH ... what controls this inside ISPConfig?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    That depends if you have a SSH user created for the site or not.
     
  10. darkangel

    darkangel New Member

    I meant for "web3" specifically. If I create a shell user "mysite-test" that user will have shell access, but "web3" itself will not.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    web3 is the shell user of the site while mysite-test is a alias entry with the same uid for web3 hat is used for logging in, so if you create a shell user to access that site, the shell of the main shell user of the site has to be changed too.
     
  12. darkangel

    darkangel New Member

    I don't follow ... I've created shell users for sites before, and the shell for the main user (web2 for example) didn't change, it's still /bin/false.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    The shell also depends if jailkit was used for the site. You might want to read the jailkit and ispconfig sources if you like to know in detail whan which shell is set and required for the system to work properly.
     
  14. darkangel

    darkangel New Member

    Thanks for your help, Till.
     

Share This Page