Disable Sym links on linux WHM/cPanel
Disabling SYM links is not a tough task on WHM/cPanel based servers, however you might not found proper way to do this, here is the quick code for disabling symlinks.
Why disabling symlinks is necessary for non-root users?
Gaining access to other accounts hosted on cPanel/WHM hosting servers is done by symbolic links, hackers usually create symbolic links on an hacked account to gain access to files hosted on other accounts so other accounts can be accessible through those symbolic links. To deal with this issue system administrator should disable symbolic links creation for non-root users.
Login to WHM/cPanel server via SSH with root access.
- execute following commands:
$ wget http://layer1.rack911.com/before_apache_make -O
$ chmod 700 /scripts/before_apache_make
- And then recompile apache by previous saved profile:
That is all, you can also check for any symbolic links already created:
$ find /home*/*/public_html -type l
This will output directories and files those are sym linked.