How to install littleutils on CloudLinux (with CageFS)

In this post we will explain how to install littleutils (which are required for the wordpress plugin: CW Image Optimizer) on a CloudLinux based server with CageFS enabled.Please note: this installation was tested on the 64 bit version of CloudLinux 6.4 with Cpanel as control panel


  • 15 minutes time
  • Root SSH Access
  • Little SSH knowledge

Step 1. Installation of littleutils

First we are going to install littleutils and make sure installation paths are ok.
  1. Login to your webserver with your favorite SSH client. (If you do not have root permissions please write "su" to receive root permissions)
  2. Make sure you have all the required dependencies just execute to following code to install the missing depedencies:
  3. # yum install gcc libpng libpng-devel gifsicle pngcrush p7zip lzip lzma
  4. Download and extract littleutils.
  5. # wget tar -jxf littleutils-1.0.27.tar.bz2# cd littleutils-1.0.27.tar.bz2
  6. Configure and install littleutils.
  7. # ./configure# make# make install# make install-extra
  8. Verify installation paths (needed for CageFS configuration).
  9. # which to-xz# which opt-jpg# which opt-png# which lowercase# which opt-gif# which tempname# which pngstrip# which jpegtran# which imagsize# which filesize# which pngcrush# which gifsicle# which pngrecolor
Note: if correctly installed you should see something like this in the output for every which:
root@server [/usr/local/bin]# which opt-jpg/usr/local/bin/opt-jpg

Step 2. Configuration of CageFS

We are now going to make sure littleutils is working when a user will be added to the CageFS in CloudLinux. The first thing we need to do is create a custom file system template (/etc/cagefs/conf.d/littleutils.cfg).
  1. Create and edit littleutils.cfg
  2. Please execute the following code
    #vi /etc/cagefs/conf.d/littlutils.cfg
    You will now see the file editor for littleutils.cfg (which is probably still empty). Please add the folowing code to the file: (press i on the keyboard to enable the vi editor and then just copy paste)
    [littlutils]comment=Littleutilspaths = /usr/local/bin/to-xz, /usr/local/bin/opt-jpg, /usr/local/bin/opt-png, /usr/local/bin/lowercase, /usr/local/bin/opt-gif, /usr/local/bin/tempname, /usr/local/bin/pngstrip, /usr/bin/jpegtran, /usr/local/bin/imagsize, /usr/local/bin/filesize, /usr/bin/pngcrush, /usr/bin/gifsicle, /usr/local/bin/pngrecolor
  3. Force update of CageFS Skeleton
  4. # cagefsctl --force-updateNote: You should see in the output that the littleutils files are being copied to the CageFS Skeleton
  5. Enable CageFS
  6. # /usr/sbin/cagefsctl --enable-all