lip 에러파일 mkdir() [function.mkdir]: Permission denied in

Ybanner.lib.php
<?
//유창화님 파일타입 배너관리 시스템 2006년 8월 22일 화요일
//Ybanner.lib.php 이 파일을 extend 폴더에 업로드 합니다.

/*제작자 : 유창화
사용제한 : 사용은 자유롭습니다. 단, 강의나 책의 내용으로서 사용될 경우 허락을 받으셔야 합니다.*/

//정보가 저장될 디렉토리를 지정하세요, 퍼미션은 웹서버가 읽고 쓸수 있어야 합니다.
$Ypath_array_files = $_SERVER['DOCUMENT_ROOT'] . '/' . "banner";
//$Ypath_array_files = $g4['path'] . '/' . "banner";//그누보드 하위에 둔다면

//해당 디렉토리가 없으면 생성
if (!is_dir($Ypath_array_files)) {

mkdir($Ypath_array_files);
chmod ($Ypath_array_files, 0777);
}

//사용된 함수
function Yget_array_from_file($path_file, $array_name){

$$array_name = Array();

if (is_file($path_file)){

@include $path_file;
}

return $$array_name;
}

function Yecho_banner($pos){

global $Ypath_array_files;

$Ypath_file = $Ypath_array_files . '/' . $pos . '.php';
$Ybanner = Yget_array_from_file($Ypath_file, 'Ybanner');

//등록된 배너일 경우에만
if (is_array($Ybanner)){

$rand_key = array_rand ($Ybanner);
echo base64_decode($Ybanner[$rand_key]);
}
}

?>

아래와 같은 에러가 뜹니다. 권한설정을 777,757,755,707 돌아가면서 변경을 해줘도 ㅠ_ㅠ
에러파일이 유지가 되네요~!!!
좀알려주세요



Warning: mkdir() [function.mkdir]: Permission denied in /home/donginji/system/extend/Ybanner.lib.php on line 15

Warning: chmod() [function.chmod]: No such file or directory in /home/donginji/system/extend/Ybanner.lib.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at /home/donginji/system/extend/Ybanner.lib.php:15) in /home/donginji/system/head.sub.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at /home/donginji/system/extend/Ybanner.lib.php:15) in /home/donginji/system/head.sub.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /home/donginji/system/extend/Ybanner.lib.php:15) in /home/donginji/system/head.sub.php on line 35

Warning: Cannot modify header information - headers already sent by (output started at /home/donginji/system/extend/Ybanner.lib.php:15) in /home/donginji/system/head.sub.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /home/donginji/system/extend/Ybanner.lib.php:15) in /home/donginji/system/head.sub.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /home/donginji/system/extend/Ybanner.lib.php:15) in /home/donginji/system/head.sub.php on line 38
|

댓글 2개

권한문제와 경로 문제인듯 싶습니다.

위의 소스중
1. mkdir($Ypath_array_files);
2. chmod ($Ypath_array_files, 0777);

여기서 발생하는 오류입니다.
1번은 디렉토리를 만들라는 거 --> 못만들어서 오류
2번은 그 만든 디렉토리의 권한을 주는거 --> 당연히 디렉토릴르 못만들었으니 권한을 줄 디렉토리가 없어서 오류.

수동으로 만들어 주셔도 됩니다. shell상에서
mkdir 디렉토리명
chmod -R 777 디렉토리명
루트에 문제였네용 ㅎㅎ 감사합니다.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
18년 전 조회 1,513
18년 전 조회 2,120
18년 전 조회 1,386
18년 전 조회 1,985
18년 전 조회 2,032
18년 전 조회 2,939
18년 전 조회 1,539
18년 전 조회 1,543
18년 전 조회 1,549
18년 전 조회 6,802
18년 전 조회 1,611
18년 전 조회 1,644
18년 전 조회 1,597
18년 전 조회 1,527
18년 전 조회 1,523
18년 전 조회 1,531
18년 전 조회 2,325
18년 전 조회 1,511
18년 전 조회 1,685
18년 전 조회 1,554
🐛 버그신고