CageFS command not working for user

I have flvtool2 installed on the server. Path to binary file location was added in file /etc/cagefs/conf.d/vshare.cfg

The binary program works properly when running as root, but it fail when switching to a user that use CageFS.

The problem is fixed by editing file /etc/cagefs/

Add following lines

Now remount cagefs with

See cagefs

OpenLiteSpeed Monit

Monitor OpenLiteSpeed with monit

OpenLiteSpeed Monit

To monitor OpenLiteSpeed with monit on Ubuntu Server, create file

Add following content

Reload monit with

Now monit will monitor OpenLiteSpeed, restart if required. You can check status with

monit status openlitespeed

If you want to monitor if web server is responding to request, you can use

Ubuntu Screen Recorder

Ubuntu come with screen recorder, this can be activated with shortcut

By default, it will record for 30 seconds. Video get saved in your home directory (/home/USERNAME) in webm format.

If you want to increase time, you can run following command

It is better to set this to 0, this way record never auto stop. You need to manually stop recording with CTRL + ALT + SHIFT + R key combination.


inotifywait monitor changes in Linux file system. It can be used to track file changes.

Here is inotifywait command used by bitninja to detect uploaded files.


When you make a copy of your site for development/testing purpose, you don’t need search engines index your site as it will cuase duplicate content.

To disable indexing of a website by search engines, create a file with name robots.txt with following content.

VLC Custom User Agent

VLC using custom HTTP User-Agent

To change User-Agent in VLC player, go to

Click on “Show more options” check box. In “Edit Options” text box, you can specify your User-Agent like

VLC Custom User Agent


MySQL cannot connect via localhost

On an Apache server, MySQL can’t connect when you use localhost, but it work when you chane to IP address

When you use “localhost”, it use socket for connecting to MySQL server, this is faster than using TCP/IP connection, that is used when you use IP address to connect to MySQL server.

First find out socket path. To do this login to MySQL server, run

mysql socket

See if you can connect using this socket with command

login to mysql using socket

In this cause, login to MySQL using socket worked.

I created a simple test PHP script to verify MySQL connection, it was able to connect to MySQL server using “localhost”.

Same script did not work when i try access it using web server. So the problem is web server user not able to connect to MySQL socket. You need to check permission for socket and parrent folders. In this case problem is fixed by running

You can verify enabling SSH access for web server user, then connect to MySQL using command line or try access socket file as apache user.

MySQL Socket Path in php.ini

When a PHP application use localhost to connect, PHP find location of socket from php.ini, you need to verify this path set in php.ini is same as the socket path used by MySQL server.

If path is differnt, you need to make it same. You can either modify php.ini or MySQL server config file.

LiteSpeed Web Server

Install LiteSpeed Web Server

LiteSpeed is a high performance web server. Unlike most other web servers, this is a paid software, so you will need to purchase a license or get trail key before you can use it.

To install LiteSpeed, download latest version of the software from

At this time of writing this post, latest version of LiteSpeed is 5.4.7

Before you can run the script, you need to copy your license key to this folder. It will ask you few questions. Once installed, admin interface will be available on URL


LiteSpeed Web Server