How To Protect Server Files From Hackers

malioxha

Member
Nov 21, 2015
23
0
1
UK
cPanel Access Level
Root Administrator
Hello,
So i have make some chmod's on "ls , find, w ,who etc "
to protect my website from symlinks
i have chmod 711 / server directory,
but i have one problem, how to protect " /etc/named.conf" and " /etc/passwd"
i have try with chmod command but if i chmod those i will get some errors as i can't open file manager :/
so any tutorial or suggestions how to protect those files ?!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463

malioxha

Member
Nov 21, 2015
23
0
1
UK
cPanel Access Level
Root Administrator
Hello :)

Could you elaborate on why you are choosing to edit the permissions of files instead of using the native options to protect against symlink attacks? There's a document on this at:

Symlink Race Condition Protection - EasyApache - cPanel Documentation

Thank you.
before to Active Symlink race i have upload a symlink on one of my hosts just to test my security and i can use some command like who, ls, grep , cat, etc , for this i have chmod those .
but now i will try Symlink Race Condition, thank you :)