Archive for Linux

User Resource limits on Cpanel Server

Today i tried to run java on a dedicated server as normal user. This is required as part of sidekick installation.

But i got following error

Error occurred during initialization of VM
Could not reserve enough space for object heap

This is caused by limits set to normal users on Cpanel server. As root java works well.

Problem is fixed by editing files

/etc/profile
/etc/bashrc
/etc/profile.d/limits.sh

and removing following entry

#cPanel Added Limit Protections — BEGIN

#unlimit so we can run the whoami
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null

LIMITUSER=$USER
if [ -e "/usr/bin/whoami" ]; then
LIMITUSER=`/usr/bin/whoami`
fi
if [ "$LIMITUSER" != "root" ]; then
ulimit -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v 200000 2>/dev/null
else
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
fi
#cPanel Added Limit Protections — END

These are added by cpanel to limit user resource when you enabled Shell Fork Bomb Protection in WHM.

Comments off

RAR files on Linux

By default Linux support .tar, .tar.gz, .bz2 and .zip compressed files.

On FreeBSD unzip command is not available, you can install from ports.

RAR files can be uncompressed with command unrar.

On linux you can install it with

yum install unrar

On FreeBSD, you can install it from package or from ports


pkg_add -r unrar
rehash

Comments off

Next entries »