Apache, linux üzerine(Redhat&Centos) base özellikleri ile kurulduğu esnada low level da olsa güvenlik problemi oluşturabilecek permission bitleri ile yapılanıyor.Bu sebeple, gereksiz yetkileri alıp aşağıdaki şekilde permission ayarları düzeltilen bir web server daha güvenli çalışacaktır.

chmod 511 /usr/sbin/httpd
chmod 750 /var/log/httpd/
chmod 750 /etc/httpd/conf/
chmod 640 /etc/httpd/conf/*
chgrp -R apache /etc/httpd/conf

Permissionları güncelledikten hemen sonra Apache’nin install edildiği bölgeyi kontrol ettiğinizde yetki kısıtlamasına maruz kalan bölümlerin permission ve owner yetkilerinin değiştiğini görmelisiniz.

pwd /etc/ ls -ld httpd/ & ls -l httpd/.
[1] 32312
drwxr-x--- 5 root root 4096 May  7 17:22 httpd/
total 36
drwxr-x--- 2 root apache 4096 Jul  7 18:14 conf
drwxr-x--- 2 root root   4096 Jun 21 23:49 conf.d
lrwxrwxrwx 1 root root     19 May  7 17:22 logs -> ../../var/log/httpd
drwxr-x--- 2 root root   4096 Jun  5 14:17 modsecurity.d
lrwxrwxrwx 1 root root     29 May  7 17:22 modules -> ../../usr/lib64/httpd/modules
lrwxrwxrwx 1 root root     13 May  7 17:22 run -> ../../var/run
[1]+  Done                    ls --color=tty -ld httpd/ 

Kaynak: NSA(National Security Agency) 
Share on Facebook