새로 생성되는 디렉토리의 퍼미션은 755 로, 파일은 644 로 설정하며, 상수로 적용

This commit is contained in:
gnuboard
2013-07-12 16:25:16 +09:00
parent 38642e2ade
commit ca925cdaaf
12 changed files with 37 additions and 33 deletions

View File

@ -97,7 +97,7 @@ while ($row = sql_fetch_array($result))
{
// 원본파일을 복사하고 퍼미션을 변경
@copy($src_dir.'/'.$row3['bf_file'], $dst_dir.'/'.$row3['bf_file']);
@chmod($dst_dir/$row3['bf_file'], 0606);
@chmod($dst_dir/$row3['bf_file'], G4_FILE_PERMISSION);
}
$sql = " insert into {$g4['board_file_table']}

View File

@ -114,11 +114,11 @@ if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name']
if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
// 아이콘 용량이 설정값보다 이하만 업로드 가능
if ($_FILES['mb_icon']['size'] <= $config['cf_member_icon_size']) {
@mkdir($mb_dir, 0707);
@chmod($mb_dir, 0707);
@mkdir($mb_dir, G4_DIR_PERMISSION);
@chmod($mb_dir, G4_DIR_PERMISSION);
$dest_path = $mb_dir.'/'.$mb_id.'.gif';
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
chmod($dest_path, 0606);
chmod($dest_path, G4_FILE_PERMISSION);
if (file_exists($dest_path)) {
//=================================================================\
// 090714

View File

@ -175,8 +175,8 @@ if (!isset($_POST['wr_subject']) || !trim($_POST['wr_subject']))
alert('제목을 입력하여 주십시오.');
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
@mkdir(G4_DATA_PATH.'/file/'.$bo_table, 0707);
@chmod(G4_DATA_PATH.'/file/'.$bo_table, 0707);
@mkdir(G4_DATA_PATH.'/file/'.$bo_table, G4_DIR_PERMISSION);
@chmod(G4_DATA_PATH.'/file/'.$bo_table, G4_DIR_PERMISSION);
$chars_array = array_merge(range(0,9), range('a','z'), range('A','Z'));
@ -276,7 +276,7 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
$error_code = move_uploaded_file($tmp_file, $dest_file) or die($_FILES['bf_file']['error'][$i]);
// 올라간 파일의 퍼미션을 변경합니다.
chmod($dest_file, 0606);
chmod($dest_file, G4_FILE_PERMISSION);
}
}