"미디어위키 업로드 가능하게 하기"의 두 판 사이의 차이

2번째 줄: 2번째 줄:


==설정파일 변경==
==설정파일 변경==
미디어위키를 처음 설치했을 때는 업로드가 불가능하게 되어있다.
미디어위키를 처음 설치했을 때는 업로드가 불가능하게 되어 있다.
왼쪽 도구모음 메뉴에 '파일 올리기'가 없을 것이다.
왼쪽 도구모음 메뉴에 '파일 올리기'가 없을 것이다.
설치폴더에 있는 [[LocalSettings.php]]에서 $wgEnableUploads를 true로 해주면 생긴다.
설치폴더에 있는 [[LocalSettings.php]]에서 $wgEnableUploads를 true로 해주면 나타난다.


*변경 전
*변경 전

2012년 1월 25일 (수) 11:33 판

1 설정파일 변경

미디어위키를 처음 설치했을 때는 업로드가 불가능하게 되어 있다. 왼쪽 도구모음 메뉴에 '파일 올리기'가 없을 것이다. 설치폴더에 있는 LocalSettings.php에서 $wgEnableUploads를 true로 해주면 나타난다.

  • 변경 전
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads  = false;
  • 변경 후
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads  = true;

이렇게 하면 왼쪽 메뉴의 도구모음에 '파일 올리기'가 생겼을 것이다.

2 폴더 권한

파일 올리기가 안되는 경우 설치폴더 아래의 images 폴더의 권한을 확인하고, 업로드가 가능하도록 권한을 조정한다.


2.1 755

  • 초기상태
[root@jmnote wiki]# ll | grep images
drwxr-xr-x  2 1244 1244   4096 Jul  8  2011 images
  • 미디어위키에서 업로드시 오류 메시지
The upload directory (public) is not writable by the webserver.

2.2 775

[root@jmnote wiki]# chmod 775 images
[root@jmnote wiki]# ll | grep images
drwxrwxr-x  2 1244 1244   4096 Jul  8  2011 images
  • 미디어위키에서 업로드시 오류 메시지
The upload directory (public) is not writable by the webserver.

2.3 777

[root@jmnote wiki]# chmod 777 images
[root@jmnote wiki]# ll | grep images
drwxrwxrwx  4 1244 1244   4096 Jan 25 11:22 images
  • 업로드 성공
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}