Directory permissions issues for Web sites under Linux __linux

Source: Internet
Author: User
Tags file permissions

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.