update single jail app sections

Discussion in 'Installation/Configuration' started by roysk, Jun 30, 2021.

  1. roysk

    roysk New Member

    if i understand correctly, when i add a new app section to Server Config-> Jailkit-> Jailkit chroot app sections:, this works for new jails and old ones (after jailkit maintenance cronjobs)
    but how do we add a new chroot app section included in jk_init.ini (eg mysql-client, uidbasics) to a single existing jail or for a single new jail?
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    My understanding is it only applies to new jails. I may be mistaken, there was improvements to jailkit use in ISPConfig 3.2.
    You can use the usual jailkit commands to modify jails.
  3. roysk

    roysk New Member

    which are the usual commands?
    to add a single program i believe it is the following
    $jk_cp -f -v -j /var/www/clients/client0/webXX/ /path/to/program
    but if i want to add a section from jk_init.ini to the existing jail webXX? is it:
    $jk_init -c /etc/jailkit/jk_init.ini -f -k -j /var/www/clients/client0/webXX mysql_client
    Doesnt work

    also, out of curiosity, hardlinks is the default option in ispconfig, right?
    cause in server config i have "allow hardlinks within jail" and that translates to yes from this line git.ispconfig.org/ispconfig/ispconfig3/-/blob/3.2.5/server/plugins-available/shelluser_jailkit_plugin.inc.php#L316
    Last edited: Jul 1, 2021
  4. roysk

    roysk New Member

    Indeed it updates old jails too through the jailkit maintenance in 3.2.5
    I verified it by adding mysql through server config and today after the midnight cron job every jail had mysql command.

    The jk_init command above didnt work, actually i think i am not supposed to jk_init on an existing jail, but i am trying this on a test server.
    Now i need to figure out if there is a way to add a section to a single jail or i am supposed to execute
    $jk_cp -f -v -j <jail> <path>
    for every file in the paths = ..., of the jk_init.ini
    Taleman likes this.
  5. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Copy the current value from Server Config > Jailkit > Jailkit chroot app sections and paste that into the website Options > Jailkit chroot app sections, then add the additional sections you want.
    There are three options, yes, no and allow, the default is allow, which means explicit hardlink cleanup is not performed (as in "no"), and the 'hardlinks' setting from /etc/jailkit/jk_update.ini will control whether hardlinks are used are not (and defaults to 0 == off on Debian).
    roysk likes this.

Share This Page