Monday, May 27, 2013

jailkit + ispconfig + ubuntu 12.04 SFTP problem

Hi,

with the jailkit on ubuntu 12.04 and installed ispconfig, by default chrooted SFTP not working. Here is a workaround:

we need to edit /etc/jailkit/jk.init.ini

change section from:

---- snip ----
comment = common files for all jails that need user/group information
libraries = /lib/libnsl.so.1, /lib64/libnsl.so.1, /lib/libnss*.so.2, /lib64/libnss*.so.2
regularfiles = /etc/nsswitch.conf, /etc/ld.so.conf
---- snip ----

to:

comment = common files for all jails that need user/group information
libraries = /lib/libnsl.so.1, /lib64/libnsl.so.1, /lib/libnss*.so.2, /lib64/libnss*.so.2, /lib/x86_64-linux-gnu/libnsl.so.1, /lib/x86_64-linux-gnu/libnss*.so.2
regularfiles = /etc/nsswitch.conf, /etc/ld.so.conf

and this section also:

---- snip ----
[netbasics]
comment = common files for all jails that need any internet connectivity
libraries = /lib/libnss_dns.so.2, /lib64/libnss_dns.so.2
regularfiles = /etc/resolv.conf, /etc/host.conf, /etc/hosts, /etc/protocols
---- snip ----


to:

[netbasics]
comment = common files for all jails that need any internet connectivity
libraries = /lib/libnss_dns.so.2, /lib64/libnss_dns.so.2, /lib/x86_64-linux-gnu/libnss_dns.so.2
regularfiles = /etc/resolv.conf, /etc/host.conf, /etc/hosts, /etc/protocols

add new chrooted user, and everything will work from now on.

Labels: , , ,

1 Comments:

Blogger Unknown said...

Thanks, helped me a lot. But:

On my 32-Bit Ubuntu 12.04 the lib path is /lib/i386-linux-gnu/*

after adjusting that, and run
jk_init -v -j uidbasics netbasics

SFTP worked in the jail

6:33 pm  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home