Apache는 OS X 10.6에서 어떤 사용자, 그룹으로 실행됩니까? 그룹을 아는 사람이 있습니까? 권한을

OS X (10.6)에서 Apache의 기본 사용자 / 그룹을 아는 사람이 있습니까? 권한을 올바르게 설정하고 싶습니다. 이미 웹 공유 가능



답변

Apache 사용자 및 그룹은 _www_www 입니다.


답변

대답은 /etc/apache2/original/httpd.conf에 있습니다.

User _www
Group _www

답변

$ id _www
uid=70(_www) gid=70(_www) groups=70(_www),404(com.apple.sharepoint.group.3),402(com.apple.sharepoint.group.1),61(localaccounts),12(everyone),403(com.apple.sharepoint.group.2)

답변

기본값은 user _www및 group _www입니다.

검사

이 명령을 실행하여 확인할 수 있습니다.

$ sudo apachectl -D DUMP_RUN_CFG

ServerRoot: "/usr/local/opt/httpd"
Main DocumentRoot: "/usr/local/var/www"
Main ErrorLog: "/usr/local/var/log/httpd/error_log"
Mutex default: dir="/usr/local/var/run/httpd/" mechanism=default
Mutex mpm-accept: using_defaults
PidFile: "/usr/local/var/run/httpd/httpd.pid"
Define: DUMP_RUN_CFG
User: name="_www" id=70
Group: name="_www" id=70

확인 / 변경

또한 확인 및 / 또는 변경하려면 httpd.conf파일 로 이동 하여 다음 부분을 찾으 십시오 .

# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User _www
Group _www

아파치 httpd.conf파일 이 어디에 있는지 모른다면 :

# Run this command to find where is httpd.conf 
# (look for this line `SERVER_CONFIG_FILE`, the last line here)
$ httpd -V

Server version: Apache/2.4.33 (Unix)
Server built:   Apr  3 2018 17:54:07
Server's Module Magic Number: 20120211:76
Server loaded:  APR 1.5.2, APR-UTIL 1.5.4
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_FLOCK_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr"
 -D SUEXEC_BIN="/usr/bin/suexec"
 -D DEFAULT_PIDLOG="/private/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/private/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/private/etc/apache2/httpd.conf" <<< Where httpd.conf is