Thursday, August 22, 2013

Hướng dẫn Chmod an toàn cho website

DigiStar đề nghị CHMOD như sau để bảo vệ an toàn cho website tại host của DigiStar:

1) CHMOD thư mục Public_html thành 710 thay vì mặc định là 750 việc này sẽ giúp bạn bảo vệ được cấu trúc Website của mình

2) CHMOD File là 404 và nhớ rằng đừng bao giờ để là 666 nếu có việc cần 666 thì bạn CHMOD tạm để sử dụng lúc đó, sau đó hãyCHMOD lại ngay.

3) Riêng với file chứa thông tin kết nối database, CHMOD thành 400 (sử dụng chức năng "File Manager" trong cPanel để CHMOD400) .Ví dụ : config.php, configuration.php , .v.v.

4) CHMOD thư mục là 701 thay vì 755 như mặc định thường dùng. Với thư mục cần ghi như images, upload ... bạn cần CHMODthành 755 và tạo file tên ".htaccess" với nội dung như sau vào ngay thư mục này :
-----------------------------------------------------------------------------
<Files ~ "^.*\.(php|cgi|pl|php3|php4|php5|php6|phtml|shtml)"> Order allow,deny 
Deny from all </Files >

Related Posts:

  • Config time vps yum -y install rdate mv /etc/localtime /etc/localtime.oldln -sf /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtimerdate -s rdate.cpanel.net Open port 37 in csf … Read More
  • Vps config install vim # apt-get install libncurses5-dev python-dev # wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 -O /data/vim-7.4.tar.bz2 # cd /data/ && tar jxf vim-7.4.tar.bz2 # cd vim74 && ./config… Read More
  • Hướng dẫn biên dịch và cấu hình NginX Cài trình biên dịch và các gói phần mềm cần thiết để phục vụ quá trình biên dịch sudo apt-get install build-essential libssl-dev libpcre3 libpcre3-dev \ libxml2-dev libxslt1-dev libgd2-xpm-dev libgeoip-dev  Tải về mã n… Read More
  • PHP 5.5 on CentOS/RHEL 6.5 and 5.10 via Yum PHP 5.5 on CentOS/RHEL 6.5 and 5.10 via Yum PHP 5.5.14 has been released on PHP.net on 26th June 2014, and is also available for CentOS/RHEL 5.10 and 6.5 at Webtatic via Yum. PHP 5.5 adds new features such as: Zend Op… Read More
  • Supervisor Supervisor is a great tool to start and manage long-running processes and the log files associated with them. It offers a lot of helpful features and is easy to get up and running. Install & Start Supervisor yum … Read More