When phpPgAdmin on Centos, Apache give 403 Forbidden

# cat /var/log/httpd/error_log
...... [core:error] ...... (13)Permission denied: [client ......] AH00035: access to ....../index.php denied (filesystem path '/var/www/phpPgAdmin-7.13.0/index.php') because search permissions are missing on a component of the path
# cat /var/log/audit/audit.log | grep "denied"
...... type=AVC msg=audit( ...... ): avc:  denied  { getattr } for  ...... comm="httpd" path="/var/www/phpPgAdmin-7.13.0/index.php" ...... scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file permissive=0
# ls -alZ /var/www/phpPgAdmin-7.13.0/index.php
-rw-r--r--. 1 apache apache unconfined_u:object_r:admin_home_t:s0 861 Nov  7  2020 index.php
# chcon -R -t httpd_sys_rw_content_t /var/www/phpPgAdmin-7.13.0/

SELinux 문제였고, 파일 설정을 바꾸어 해결했다.

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.