|
Securing your Linux server |
|
Wednesday, 09 February 2005 |
|
When you have root access (SSH) to your server you can make it more secure by doing:
chmod 000 /usr/bin/perlcc chmod 000 /usr/bin/byacc chmod 000 /usr/bin/yacc chmod 000 /usr/bin/bcc chmod 000 /usr/bin/kgcc chmod 000 /usr/bin/cc chmod 000 /usr/bin/wget chmod 000 /usr/bin/gcc chmod 000 /usr/bin/i386*cc chmod 000 /usr/bin/*c++ chmod 000 /usr/bin/*g++ chmod 000 /usr/lib/bcc /usr/lib/bcc/bcc-cc1 chmod 000 /usr/i386-glibc21-linux/lib/gcc-lib/i386-redhat-linux/2.96/cc1
chmod 750 /usr/bin/curl
And if you need it to install something:
chmod 755 /usr/bin/perlcc chmod 755 /usr/bin/byacc chmod 755 /usr/bin/yacc chmod 755 /usr/bin/bcc chmod 755 /usr/bin/kgcc chmod 755 /usr/bin/cc chmod 755 /usr/bin/wget chmod 755 /usr/bin/gcc chmod 755 /usr/bin/i386*cc chmod 755 /usr/bin/*c++ chmod 755 /usr/bin/*g++ chmod 755 /usr/lib/bcc /usr/lib/bcc/bcc-cc1 chmod 755 /usr/i386-glibc21-linux/lib/gcc-lib/i386-redhat-linux/2.96/cc1
It's not the best solution but it works. Watch out with wget some scripts need it. and also: /scripts/enablefileprotect |