루트 가 아 닌 사용자 설치 nginx
                                            
 3090 단어  rootnginx사용자 설치apache 와 nginx
                    
nginx: [emerg] bind() to 0.0.0.0:80 failed(13: Permission denied)
일반 사용 자 는 1024 이상 의 포트 만 사용 할 수 있 고 1024 이내 의 포트 는 루트 사용자 만 사용 할 수 있 기 때문이다.
일반 사용자 가 restart 와 reload nginx 에 있 을 때 오류 가 발생 합 니 다: nginx: [warn] the "user" directive makes sense only if the master proce * * uns with super - user privileges, ignored in / home / tomcat / nginx / conf / nginx. conf: 2
이 유 는 기본 적 인 상황 에서 Liux 의 1024 이하 포트 는 루트 사용자 만 사용 할 수 있 는 권한 이 있 기 때 문 입 니 다.
방법 1:
모든 사용자 가 실행 할 수 있 습 니 다 (755 권한 이기 때문에 파일 소유자: root, 그룹 소유자: root)
chown root:root nginx
chmod 755 nginx
chmod u+s nginx
방법 2:
루트 사용자 와 test 사용자 만 실행 할 수 있 습 니 다 (750 권한 이기 때문에 파일 소유자: 루트, 그룹 소유자: test)
chown root:test nginx
chmod 750 nginx
chmod u+s nginx
chmod u+s             suid  ,   root      。
Set uid, gid,sticky bit          
 
           ,           .   ,           ,          ,             .
 
          ,       ,                      .  setuid, setgid          .
 
setuid:                     .        /usr/bin/passwd.            ,        ,        root 
 
 ,            .
 
setgid:          .         ,                              .
 
sticky bit:            .               ,      
 
                  .        ,                  ,            .             
 
         ,         sticky bit .      ,        
 
     ,         .
 
             :
 
                    ,    chmod.         ,
 
1) chmod u+s temp — temp    setuid  . (setuid       )
 
chmod g+s tempdir — tempdir    setgid   (setgid       )
 
chmod o+t temp — temp    sticky   (sticky      )
 
2)        .                   ,   666, 777, 644 .           ,                  .  
 
4666, 2777 .                ,
 
abc
 
a - setuid ,      1,      setuid
 
b - setgid ,      1,      setgid
 
c - sticky ,      1,      sticky
 
        ,     ls -l    .        ,                .  
 
rwsrw-r–    setuid  
 
rwxrwsrw-    setgid  
 
rwxrw-rwt    sticky  
 
         x      ?         ,          x,                (s, s,t).   ,         (S, S, T)yum -y install zlib-devel opensslopenssl-devel
 
useradd -M -s /sbin/nologin nginx
 ---------      -------- cd /opt/nginx-1.2.8/
 
./configure \
--prefix=/home/tomcat/nginx \                                                                                   
--user=tomcat \
--group=tomcat \
--error-log-path=/home/tomcat/nginx/nginxvar/nginx-log/error.log\
--http-log-path=/home/tomcat/nginx/nginxvar/nginx-log/access.log\                                              
--pid-path=/home/tomcat/nginx/nginxvar/nginx-run/nginx.pid\                                                    
--lock-path=/home/tomcat/nginx/nginxvar/nginx-lock/nginx.lock\
--with-http_ssl_module \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--with-pcre=/home/tomcat/nginx/nginxvar/pcre-8.40이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
grootJS ui 컨트롤 정의index13.html 하나의 공간을 사용하려면 먼저 js에서 컨트롤러require ("./ui) 를 인용해야 합니다. html에서 연결 컨트롤 name는 속성 이름입니다. myui는 컨트롤 이름입니다. 다음은 이 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.