2012.11.16 04:47
웹서버의 DocumentRoot 경로 하단에 심볼릭 링크로 연결된 디렉토리가 있을 때,
해당 URL 경로에 접근 시 'HTTP 403 권한 없음' 오류가 발생 하는 경우가 있습니다.
apache의 error log를 살펴 보면 심볼릭 링크에 access가 불가능하다는 메세지가 발생 합니다.
[error] [client 211.115.223.215] Symbolic link not allowed or link target not accessible: /home/hostway/test
위와 같은 에러가 발생할 경우 다음 항목을 확인해 보아야 합니다.
1. httpd.conf 내 해당 Directory 설정에 FollowSymLinks 옵션이 들어가 있는지
<Directory "/home/hostway">
Options FollowSymLinks <----------
.
.
</Directory>
2. 심볼릭 링크 파일의 소유권 확인
심볼릭 링크 파일 자체의 소유권이 실제 디렉토리 및 파일과 다를 때 권한 문제가 발생할 수 있습니다.
이 경우, chown -h 명령으로 심볼릭 링크 파일의 소유권을 변경해 주어야 합니다.
[변경 전]
[root@localhost hostway]# ls -la /home/hostway/test
lrwxrwxrwx 1 root root 5 11월 15 19:41 /home/hostway/test -> /test
[변경 후]
[root@localhost hostway]# chown -h hostway.hostway /home/hostway/test
[root@localhost hostway]# ls -la /home/hostway/test
lrwxrwxrwx 1 hostway hostway 5 11월 15 19:41 /home/hostway/test -> /test
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
3 | ModSecurity 설치 해보기 | sylee | 2008.09.11 | 37907 |
2 | mod_rewrite 모듈 설치 및 기본 사용법 | sylee | 2009.07.02 | 38426 |
1 | 웹접속 속도가 느려 졌을때 점검 해보기 | sylee | 2008.05.20 | 60759 |