Troubleshoot multiple node access shared storage permissions for a Web cluster

Source: Internet
Author: User

1, the user Unified UID for all Web cluster nodes such as 888, the user is best also unified

For our problem at the time:

Apache server:useradd-u 888-s/sbin/nologin-m www chown-r www.www/application/apache/html/chown-R www mount point ngi NX Server:useradd-u 888-s/sbin/nologin-m nginx chown-r nginx mount point Chown-r nginx.nginx/application/nginx/html/


Tips:

A, the work of all Files 644 directory 755, users and groups are root, upload the directory before the Web user to write.

b, the work of the software and version should be unified, do not use Apache and Nginx at the same time.

2. On Shared storage NFS (other storage is similar)

1, shared storage node user Unified UID such as 888, the user is best also unified

[Email protected] ~]# cat/etc/exports #data shared by Oldboy at 20151110/data 172.16.1.0/24 (rw,sync,all_squash,anonuid= 888,anongid=888) [[email protected] ~]# useradd-u 888-s/sbin/nologin-m www[[email protected] ~]#/etc/init.d/nfs Restar T


Check:

[Email protected] ~]# cat/var/lib/nfs/etab/data 172.16.1.0/24 (Rw,sync,wdelay,hide,nocrossmnt,secure,root_squash, All_squash,no_subtree_check,secure_locks,acl,anonuid=888,anongid=888,sec=sys,rw,root_squash,all_squash)


Shared directory Authorization

[Email protected] ~]# chown-r www.www/data/


Http://oldboy.blog.51cto.com It technology to old boys professional training

This article is from the "Youngcheung Technology Road" blog, reprint please contact the author!

Troubleshoot multiple node access shared storage permissions for a Web cluster

Related Article

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.