{"id":604,"date":"2019-01-09T12:32:51","date_gmt":"2019-01-09T12:32:51","guid":{"rendered":"https:\/\/www.kolkataonweb.com\/code-bank\/?p=604"},"modified":"2019-01-09T12:42:02","modified_gmt":"2019-01-09T12:42:02","slug":"ispconfig-with-jailkit-allowing-custom-or-other-commands-for-users","status":"publish","type":"post","link":"https:\/\/www.kolkataonweb.com\/code-bank\/miscellaneous\/ispconfig-with-jailkit-allowing-custom-or-other-commands-for-users\/","title":{"rendered":"ISPConfig with Jailkit &#8211; allowing custom or other commands for users"},"content":{"rendered":"<p>By default Jailkit allows certain commands or applications only. Below is the process to allow your users to access other commands or any custom command.<\/p>\n<p>Here I wanted users to access PHP commandline and composer<\/p>\n<ol>\n<li>\n<pre class='wp-code-highlight prettyprint'><em>If needed then first install those applications normally as root<\/em><\/pre>\n<\/li>\n<li>\n<pre class='wp-code-highlight prettyprint'>Add entries for the applications\/commands to the jailkit config file\r\n<a href=\"https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2019\/01\/jailkit-config.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-606 size-large\" src=\"https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2019\/01\/jailkit-config-1024x336.png\" alt=\"\" width=\"604\" height=\"198\" srcset=\"https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2019\/01\/jailkit-config-1024x336.png 1024w, https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2019\/01\/jailkit-config-300x98.png 300w, https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2019\/01\/jailkit-config-768x252.png 768w, https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2019\/01\/jailkit-config.png 1180w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a>\r\n \r\nThese block names will be used in ISPConfig.\r\n\r\n<strong>The folder\/directories are important<\/strong> - else the necessary libraries and supporting files will not be copied and the application will not work properly for the users.<\/pre>\n<\/li>\n<li>\n<pre class='wp-code-highlight prettyprint'>Once the blocks have been added, the programs and all related files will have to be copied to the particular users webspace. \r\n\r\nThe jk_init command copies all files and related libraries with permissions. \r\n\r\njk_init -c \/etc\/jailkit\/jk_init.ini -f -k -j \/var\/www\/clients\/clientXXX\/webXXX php\r\n\r\n<em>jk_init -c \/etc\/jailkit\/jk_init.ini -f -k -j \/var\/www\/clients\/client1\/web3 composer\r\n<\/em><\/pre>\n<\/li>\n<li>\n<pre class='wp-code-highlight prettyprint'>After copying the files update the Jailkit section of ISPConfig - add the block names of the applications that the users will be permitted to use\r\nSystem -&gt; Server Config -&gt; Jailkit chroot app section\r\n\r\n<a href=\"https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2019\/01\/ispconfig-jailkit.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-605\" src=\"https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2019\/01\/ispconfig-jailkit-1024x428.png\" alt=\"\" width=\"604\" height=\"252\" srcset=\"https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2019\/01\/ispconfig-jailkit-1024x428.png 1024w, https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2019\/01\/ispconfig-jailkit-300x125.png 300w, https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2019\/01\/ispconfig-jailkit-768x321.png 768w, https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2019\/01\/ispconfig-jailkit.png 1265w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a>\r\n\r\n<\/pre>\n<\/li>\n<\/ol>\n<p>If the commands are still not accessible &#8211; then the users should try relogin first.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default Jailkit allows certain commands or applications only. Below is the process to allow your users to access other commands or any custom command. Here I wanted users to access PHP commandline and composer If needed then first install those applications normally as root Add entries for the applications\/commands to the jailkit config file&hellip; <a class=\"more-link\" href=\"https:\/\/www.kolkataonweb.com\/code-bank\/miscellaneous\/ispconfig-with-jailkit-allowing-custom-or-other-commands-for-users\/\">Continue reading <span class=\"screen-reader-text\">ISPConfig with Jailkit &#8211; allowing custom or other commands for users<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[130,127,128,129,131],"class_list":["post-604","post","type-post","status-publish","format-standard","hentry","category-miscellaneous","tag-composer","tag-ispconfig","tag-ispconfig3","tag-jailkit","tag-php-commandline","entry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/604","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/comments?post=604"}],"version-history":[{"count":6,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/604\/revisions"}],"predecessor-version":[{"id":612,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/604\/revisions\/612"}],"wp:attachment":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/media?parent=604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/categories?post=604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/tags?post=604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}