POST TIME:2021-05-24 02:58
chown -R centos.www web find web -type d -exec chmod 750 {} \; find web -not -type d -exec chmod 640 {} \;2、data、templets、uploads、a images目录, 设置可读写,不可执行的权限;
cd /home/centos/web chmod -R 770 data templets uploads a images设置不可执行权限:
<Directory /home/centos/web/data> php_flag engine of </directory> <Directory ~ "^/home/centos/web/data"> <Files ~ ".php"> Order allow,deny Deny from all </files> </directory>nginx的设置如下:
location ~* ^/(data|templets|uploads|a|images)/.*\.(php|php5)$ { deny all; }3、不需要专题的,建议删除 special 目录, 需要可以在生成HTML后,
mysql -uroot -p mysql>GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER,CREATE TEMPORARY TABLES ON centossql.* TO centossql@localhost IDENTIFIED BY 123456; mysql>FLUSH PRIVILEGES; mysql>exit3、更改默认管理目录dede,改到不易被猜到就好。