root 로 아파치 실행시 권한이 없다고 나옵니다.

ditus의 이미지

간신히 고생하며 APM설치를 완료하고...여기저기 문서들을 보면서

세팅도 하고...

기쁜 마음에 웹에서 아파치 서버를 확인해보려고

localhost/index.html 을 실행시켜 보니...

Forbidden
You don't have permission to access /index.html on this server.

Apache/1.3.33 Server at localhost Port 80

이런 오류가 뜨네요...

http://127.0.0.1/index.html 을 실행시켜봐도 마찬가지구요...

전 분명 루트 권한으로 실행을 시켰는데...메세지를 해석보면...

서버에 있는 index.html 에 엑세스 할 수 있는 권힌이 없다는 이야기

같은데요...루트는 어떤 권한이라도 다 가진거 아닌가요??

아파치는 root/usr/local/apache 이곳에 설치가 된 상태이구요.

[root@localhost root]# ps -ef | grep httpd
root 4292 1 0 11:10 ? 00:00:00 /usr/local/apache/bin/httpd
nobody 4361 4292 0 11:45 ? 00:00:00 [httpd]
nobody 4362 4292 0 11:45 ? 00:00:00 [httpd]
nobody 4363 4292 0 11:45 ? 00:00:00 [httpd]
nobody 4364 4292 0 11:45 ? 00:00:00 [httpd]
nobody 4365 4292 0 11:45 ? 00:00:00 [httpd]
nobody 4366 4292 0 11:45 ? 00:00:00 [httpd]
root 4429 4259 0 12:06 pts/1 00:00:00 grep httpd

이거 보면 아파치도 잘 실행되는 것 같은데요...

혹시 몰라 httpd.conf 설정 상황도 올려봅니다...

=======================================

User nobody
Group nobody

ServerName localhost

DocumentRoot "/usr/local/apache/htdocs"

<Directory "/usr/local/apache/htdocs">

Options Indexes FollowSymLinks MultiViews

<IfModule mod_userdir.c>
UserDir public_html
</IfModule>

<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.php index.php3 index.cgi
</IfModule>

<IfModule mod_mime.c>
TypesConfig /usr/local/apache/conf/mime.types
</IfModule>

AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddCharset ISO-8859-8 .iso8859-8
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage kr .kr
AddCharset ISO-2022-KR .iso-kr
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cs .cz .cs
AddLanguage ru .ru
AddLanguage zh-TW .zh-tw
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
# AddCharset UTF-8 .utf8

=========================================

이정도 보여드리면 되는건지...에궁.. 정말 어렵네요

참...index.html 파일은 htdocs 디렉토리에 있습니다.

[root@localhost htdocs]# pwd
/usr/local/apache/htdocs
[root@localhost htdocs]# ls
apache_pb.gif index.html.he.iso8859-8 index.html.ru.cp-1251
index.html index.html.hu index.html.ru.cp866
index.html.ca index.html.it index.html.ru.iso-ru
index.html.cz index.html.ja.jis index.html.ru.koi8-r
index.html.de index.html.lb.utf8 index.html.ru.ucs2
index.html.dk index.html.nl index.html.ru.ucs4
index.html.ee index.html.nn index.html.ru.utf8
index.html.el index.html.no index.html.se
index.html.en index.html.po.iso-pl index.html.zh-tw.big5
index.html.es index.html.pt index.php
index.html.fr index.html.pt-br manual

혼자서 해보려고 검색도 여기저기 했는데...정말 너무 힘드네요.

도움 부탁드립니다...(__)

망치의 이미지

해당 페이지가 뜨는것은 아파치는 정상동작 하고 있는겁니다.
index.html 파일의 퍼미션이나, 해당 파일이 있는 디렉토리의 퍼미션을 확인해보세요. nobody 가 읽을 수 있도록 설정되어 있어야 합니다.

---------------------------------------
http://www.waitfor.com/
http://www.textmud.com/

ditus의 이미지

망치님 말씀대로 해봤는데요.. 그냥 htdocs 디렉토리에있는 모든 파일에

아무나 다 읽고 쓰고 실행 할 수 있도록 권환을 줬습니다.

그런후 웹으로 확인해보니...index.html 파일을 다운 받더라구요?

그래서 덮어 씌우고...다시 해봤는데...

그래도 똑같이 퍼미션 에러가 나네요..nobody 가 읽을 수 있도록 하려면

어떻게 해야하나요.. 모든 사용자가 읽게 권한을 줬는데...

=========================================

[root@localhost htdocs]# ls -l
합계 136
-rw-r--r-- 1 501 games 2326 7월 3 1996 apache_pb.gif
-rwxrwxrwx 1 root root 1333 8월 6 15:27 index.html
-rwxrwxrwx 1 501 games 1884 6월 26 2001 index.html.ca
-rwxrwxrwx 1 501 games 1583 6월 27 2001 index.html.cz
-rwxrwxrwx 1 501 games 2274 9월 17 2001 index.html.de
-rwxrwxrwx 1 501 games 1557 6월 27 2001 index.html.dk
-rwxrwxrwx 1 501 games 1877 6월 27 2001 index.html.ee
-rwxrwxrwx 1 501 games 1677 6월 27 2001 index.html.el
-rwxrwxrwx 1 501 games 1456 5월 4 2001 index.html.en
-rwxrwxrwx 1 501 games 1799 6월 27 2001 index.html.es
-rwxrwxrwx 1 501 games 1525 6월 27 2001 index.html.fr
-rwxrwxrwx 1 501 games 3706 6월 27 2001 index.html.he.iso8859-8-rwxrwxrwx 1 501 games 2585 2월 2 2004 index.html.hu
-rwxrwxrwx 1 501 games 1847 11월 8 2001 index.html.it
-rwxrwxrwx 1 501 games 1799 12월 14 2001 index.html.ja.jis
-rwxrwxrwx 1 501 games 1896 5월 21 2002 index.html.lb.utf8
-rwxrwxrwx 1 501 games 2007 6월 28 2001 index.html.nl
-rwxrwxrwx 1 501 games 1534 9월 7 2001 index.html.nn
-rwxrwxrwx 1 501 games 1526 6월 28 2001 index.html.no
-rwxrwxrwx 1 501 games 1497 6월 28 2001 index.html.po.iso-pl
-rwxrwxrwx 1 501 games 1842 6월 28 2001 index.html.pt
-rwxrwxrwx 1 501 games 2035 3월 22 2001 index.html.pt-br
-rwxrwxrwx 1 501 games 1591 6월 28 2001 index.html.ru.cp-1251
-rwxrwxrwx 1 501 games 1585 6월 28 2001 index.html.ru.cp866
-rwxrwxrwx 1 501 games 1589 6월 28 2001 index.html.ru.iso-ru
-rwxrwxrwx 1 501 games 1585 6월 28 2001 index.html.ru.koi8-r
-rwxrwxrwx 1 501 games 3134 1월 27 2001 index.html.ru.ucs2
-rwxrwxrwx 1 501 games 6268 1월 27 2001 index.html.ru.ucs4
-rwxrwxrwx 1 501 games 2318 6월 28 2001 index.html.ru.utf8
-rwxrwxrwx 1 501 games 1700 6월 28 2001 index.html.se
-rwxrwxrwx 1 501 games 1062 5월 14 2003 index.html.zh-tw.big5
-rwxrwxrwx 1 root root 1 8월 6 15:29 index.php
drwxr-xr-x 8 root root 4096 8월 2 21:51 manual
=========================================

참 다운로드창은 이렇게 뜹니다.

==========================================

application/x-httpd-php파일 형식 다운로드를 선택했습니다.
http://localhost/
이 파일을 Mozilla 할까요?

o 응용 프로그램을 이용하여 열기 [선택]
o 파일 디스크에 저장

==========================================

받아보면 index.html 파일이나 index.php 파일이 다운됩니다
이렇게 새로받게 되면 권한도 다 풀려버리구요...
다시 권한 설정해서 웹으로 확인하려해보면 또 index파일을 다운 받고...
어찌해야 될가요...

망치의 이미지

htdocs 디렉토리 퍼미션을 755 로 주시고 다시 한번 시도해보세요.

chmod 755 .

하시면 됩니다.

그리고 되도록이면 루트 디렉토리의 하위가 아닌 다른 디렉토리를 사용하시는게 좋을듯합니다..

---------------------------------------
http://www.waitfor.com/
http://www.textmud.com/

ditus의 이미지

이상하게..그래도 안되네요.

도대체 뭐가 문제인건지....

[root@localhost apache]# chmod 755 htdocs

맞게 했는데...

ㅜ ㅜ

망치의 이미지

php 파일 말고 일반 html, htm 파일에 접근해보세요.
php 파일에만 접근이 안된다면 php 모듈이 제대로 로드가 안됐을 확률이 높습니다..

---------------------------------------
http://www.waitfor.com/
http://www.textmud.com/

익명 사용자의 이미지

index.html 이나 index.php 둘다 증상이 같네요.

권한 변경하고 확이해보면 다운받는 창 나오고..

다운 받아보면 권한은 다시 원래대로 돌아와있고...

(어쩔때는 index파일을 다운 받는게 아니고 이상한 이름의 파일을

받을때도 있어요. 불규칙한 알파벳이랑 숫자로 이루어진...ㅡ ㅡ;;)

이긍...다시 설치해야하는건가요...

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.