The Site Directory file permissions settings are critical to the security of the site, the following simple description of the Site Directory file permissions of the basic settings.
We assume that the HTTP server is running the user and user group is WWW, the site user for Ubuntu, the site root directory is/home/centos/web.
‘
’
We first set the site directory and the owner of the file and all groups for centos,www, such as the following command:
Chown-r Ubuntu:www/home/centos/web
Set the Site Directory permissions to 750,
750 is the CentOS user has read and write permission to the directory, so that CentOS users can create files in any directory, the user group has read execution permission to enter the directory, other users do not have any permissions.
Set Web site file permissions 640,640 means only CentOS users have changed permissions on the Web site files, the HTTP server can only read files, cannot change files, and other users do not have any permissions.
Set writable permissions for an individual directory. For example, some cached directories on a Web site require write access to the HTTP service. For example, the/data/directory for Discuz x2 must write permissions.