Table of Contents
Articles you may be interested in
Home Backend Development PHP Tutorial DedeCMS (Dreamweaver) website server directory security setting experience sharing_PHP tutorial

DedeCMS (Dreamweaver) website server directory security setting experience sharing_PHP tutorial

Jul 13, 2016 am 10:30 AM
dedecms Security Settings server Table of contents dream weaving website

The current Internet environment is becoming more and more severe. Security has always been an issue that cannot be ignored by program developers and webmasters. How to choose an easy-to-use and safe program and how to build a secure server environment? It has always been something that most webmasters are eager to know. This article combines the server and DedeCms to configure a safe environment.

1. Directory permissions

We do not recommend users to set the column directory in the root directory because it will be very troublesome to set up security in this way. By default, after the installation is completed, the directory setting is as follows:

(1) Data, templets, uploads, a or 5.3 html directory, set read-write, non-executable permissions;

(2) If you don’t need a special topic, it is recommended to delete the special directory. If you need it, you can delete special/index.php after generating HTML and set the directory to read, write, and non-executable permissions;

(3) The include, member, plus, and background management directories are set to executable scripts, which are readable but not writable (if additional modules are installed, the book, ask, company, and group directories are also set in the same way).

2. Other issues that need attention

(1) Although the install directory has been strictly processed, for safety reasons, we still recommend deleting it;

(2) Do not directly use MySQL root user permissions on websites. Set up an independent MySQL user account for each website. The permissions are:

SELECT, INSERT, UPDATE, DELETE
CREATE , DROP , INDEX , ALTER , CREATE TEMPORARY TABLES

Since dede does not use stored procedures anywhere, be sure to disable FILE, EXECUTE, etc. permissions to perform stored procedures or file operations.

3. How to set the permissions of the directory?

For users who know how to use Linux, I believe most of them already know these things. For IIS users, please see the picture below:

3.1 Set the directory to read-only permission

First copy the permissions

Set directory as read-only permission

3.2 Setting the directory does not allow script execution

Another thing to note is that neither IIS nor Apache should add .php and .inc files to mime, otherwise the system will prohibit downloading of these files.

4. Apache site security settings

If you are running Windows 2003, you can perform the following operations on Apache:

4.1 Create an account in the local users and groups in computer management, for example: DedeApache, set the password to DedeApachePWD, and join the guests group (if problems occur, you can grant user permissions);

4.2 Open Start->Administrative Tools->Local Security Policy, select "Log on as a service" in "User Rights Assignment", and add the DedeApache user;

4.3 Select services in computer management, find apache2.2, stop the service first, right-click -> Properties, select login, switch the radio button from the local system account to this account, then search and select DedeApache, enter the password DedeApachePWD , and then click OK (Apache cannot start normally at this time, and generally an error will be reported: Apache2.2 service stopped due to 1 (0x1) service error.);

4.4 Grant the apache installation directory (for example: D:/apache2.2) and the web directory (for example: D:/wwwroot) the read and write permissions of the DedeApache account, and remove all permissions except administrator and system from the root directory of each disk. Grant readable column directory permissions to the apache account in the root directory of the disk where the DedeApache installation directory is located

We can add the following content in the site configuration:

<Directory "D:\dedecms\www\uploads"> 
<FilesMatch ".php"> 
Order Allow,Deny 
Deny from all 
</FilesMatch> 
</Directory> 
<Directory "D:\dedecms\www\data"> 
<FilesMatch ".php"> 
Order Allow,Deny 
Deny from all 
</FilesMatch> 
</Directory> 
<Directory "D:\dedecms\www\templets"> 
<FilesMatch ".php"> 
Order Allow,Deny 
Deny from all 
</FilesMatch> 
</Directory> 
<Directory "D:\dedecms\www\a"> 
<FilesMatch ".php"> 
Order Allow,Deny 
Deny from all 
</FilesMatch> 
</Directory>
Copy after login

This corresponds to canceling the script execution permission of the corresponding directory.

5. Change the data directory path

In addition, in DedeCMS V5.7, users can also set the data directory to the upper level non-web access directory. The basic operation is as follows:

5.1 Move the data directory to the upper level directory, just cut it here;

5.2 Configure the DEDEDATA file in include/common.inc.php

define('DEDEDATA', DEDEROOT.'/data');

can be changed to something like:

define('DEDEDATA', DEDEROOT.'/../../data');

5.3 Set template cache path in the background

Articles you may be interested in

  • How to optimize servers, staticize, database optimization, and load balancing for high-traffic websites to achieve high load
  • dedeCMS Dream Weaver Message Board How to call the website head
  • How to enhance the security of Linux and Unix server systems
  • The role of Xdebug and its installation and configuration details
  • Eight design details of B2C websites
  • Mysql server master-slave database synchronization configuration
  • How to check how many websites are hung on the same server
  • Solution to the DedeTag Engine Create File False error in dedeCMS

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/764161.htmlTechArticleThe current Internet environment is becoming more and more severe, and security has always been an issue that cannot be ignored by program developers and webmasters. Question, how to choose an easy-to-use, safe program, how to build an...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to configure Dnsmasq as a DHCP relay server How to configure Dnsmasq as a DHCP relay server Mar 21, 2024 am 08:50 AM

The role of a DHCP relay is to forward received DHCP packets to another DHCP server on the network, even if the two servers are on different subnets. By using a DHCP relay, you can deploy a centralized DHCP server in the network center and use it to dynamically assign IP addresses to all network subnets/VLANs. Dnsmasq is a commonly used DNS and DHCP protocol server that can be configured as a DHCP relay server to help manage dynamic host configurations in the network. In this article, we will show you how to configure dnsmasq as a DHCP relay server. Content Topics: Network Topology Configuring Static IP Addresses on a DHCP Relay D on a Centralized DHCP Server

How to install PHP FFmpeg extension on server? How to install PHP FFmpeg extension on server? Mar 28, 2024 pm 02:39 PM

How to install PHPFFmpeg extension on server? Installing the PHPFFmpeg extension on the server can help us process audio and video files in PHP projects and implement functions such as encoding, decoding, editing, and processing of audio and video files. This article will introduce how to install the PHPFFmpeg extension on the server, as well as specific code examples. First, we need to ensure that PHP and FFmpeg are installed on the server. If FFmpeg is not installed, you can follow the steps below to install FFmpe

How to read the catalog when reading on WeChat How to view the catalog How to read the catalog when reading on WeChat How to view the catalog Mar 30, 2024 pm 05:56 PM

The mobile version of WeChat Reading App is a very good reading software. This software provides a lot of books. You can read them anytime, anywhere with just one click to search and read them online. All of them are officially authorized and different types of books are neatly arranged. Sort and enjoy a comfortable and relaxing reading atmosphere. Switch the reading modes of different scenarios, update the latest book chapters continuously every day, support online login from multiple devices, and batch download to the bookshelf. You can read it with or without the Internet, so that everyone can discover more knowledge from it. Now the editor details it online Promote the method of viewing the catalog for WeChat reading partners. 1. Open the book you want to view the catalog and click in the middle of the book. 2. Click the three lines icon in the lower left corner. 3. In the pop-up window, view the book catalog

Detailed explanation of the advantages and utility of Golang server Detailed explanation of the advantages and utility of Golang server Mar 20, 2024 pm 01:51 PM

Golang is an open source programming language developed by Google. It is efficient, fast and powerful and is widely used in cloud computing, network programming, big data processing and other fields. As a strongly typed, static language, Golang has many advantages when building server-side applications. This article will analyze the advantages and utility of Golang server in detail, and illustrate its power through specific code examples. 1. The high-performance Golang compiler can compile the code into local code

Equipped with AMD EPYC 4004 series processors, ASUS launches a variety of server and workstation products Equipped with AMD EPYC 4004 series processors, ASUS launches a variety of server and workstation products Jul 23, 2024 pm 09:34 PM

According to news from this website on July 23, ASUS has launched a variety of server and workstation-level products powered by AMD EPYC 4004 series processors. Note from this site: AMD launched the AM5 platform and Zen4 architecture EPYC 4004 series processors in May, offering up to 16-core 3DV-Cache specifications. ASUSProER100AB6 server ASUSProER100AB6 is a 1U rack server product equipped with EPYC Xiaolong 4004 series processor, suitable for the needs of IDC and small and medium-sized enterprises. ASUSExpertCenterProET500AB6 workstation ASUSExpertCenterProET500AB6 is a

Where is the imperial cms resource network template? Where is the imperial cms resource network template? Apr 17, 2024 am 10:00 AM

Empire CMS template download location: Official template download: https://www.phome.net/template/ Third-party template website: https://www.dedecms.com/diy/https://www.0978.com.cn /https://www.jiaocheng.com/Installation method: Download template Unzip template Upload template Select template

How dedecms implements template replacement How dedecms implements template replacement Apr 16, 2024 pm 12:12 PM

Template replacement can be implemented in Dedecms through the following steps: modify the global.cfg file and set the required language pack. Modify the taglib.inc.php hook file and add support for language suffix template files. Create a new template file with a language suffix and modify the required content. Clear Dedecms cache.

What website can dedecms do? What website can dedecms do? Apr 16, 2024 pm 12:24 PM

Dedecms is an open source CMS that can be used to create various types of websites, including: news websites, blogs, e-commerce websites, forums and community websites, educational websites, portals, other types of websites (such as corporate websites, personal websites, photo album websites, video sharing website)

See all articles