Jailkit/Chroot – Allow Less and More

Posted on

Jailkit/Chroot – Allow Less and More – A server stack is the collection of software that forms the operational infrastructure on a given machine. In a computing context, a stack is an ordered pile. A server stack is one type of solution stack — an ordered selection of software that makes it possible to complete a particular task. Like in this post about Jailkit/Chroot – Allow Less and More was one problem in server stack that need for a solution. Below are some tips in manage your linux server when you find problem about linux, redhat, chroot, less, jailkit.

I have the need to add the LESS and MORE commands to a jailed-user. I’ve attempted the following and can’t quite get it to work:

# which less;which more 

/usr/bin/less /usr/bin/more

Now that I know where the binaries are, I do the following:

jk_cp -j /usr/jail /usr/bin/less
jk_cp -j /usr/jail /usr/bin/more

Then when I go to test it out I get the following:

su - jailed-user
less err.log

WARNING: terminal is not fully functional
err.log (press RETURN)

Not sure what else I need to do to make this fully functional

less and more use Linux terminfo database for sending proper code combinations for your terminal you are using.

The terminfo database is located at /usr/share/terminfo. This has to be available inside the jail.

You don’t need the whole database, only the term types that are in active use.

When logging in to the server, you can use set to see the value of TERM variable, which tells what entry the current session needs.

The termtype varies between terminal programs used to access the server.

Leave a Reply

Your email address will not be published. Required fields are marked *