Dec 22, 2012
cPanel Access Level
Root Administrator
Hi ,

My server got hacked by create symlink to root, Now I trying to fix this security hole. The general recommendation is to use something like grsecurity kernel or rack911 symlink patch. But rack911 not working in my server, the below is my server information:

• CENTOS 5 – cPanel WHM 11.38.1 (build 15)
• root_options: ExecCGI, FollowSymLinks, IncludesNOEXEC, Indexes, SymLinksIfOwnerMatch.

I did this steps in my server,
1. wget -O /scripts/before_apache_make
2. chmod 700 /scripts/before_apache_make

3. Rebuild apache after.

Now after all that, I can create symlink to root ?! Please advice me ,,


Well-Known Member
Oct 20, 2009
cPanel Access Level
DataCenter Provider
you can still make the links, the patch only stops following them via apache. As long as you compiled 2.2.x apache (not 2.0 or 2.4) you should be OK.

To test, make the symlink inside of a public_html directory, then browse to the symlink name in a browser. I'm not going to list instructions because if you carelessly remove the symlink you can accidently remove the target file(s).

I strongly recommend cloudlinux with securelinks enabled in the modhostinglimits.conf