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