MYSQL 보안점검을 받았는데, 점검결과중에 MYSQL DATA 파일에 대해 권한을 640 이하로 설정을 하라고 권고사항이 나왔습니다...
그래서, 실행스크립트내에 (mysqld_safe 파일) 의 umask 값을 077 로 변경을 하였음에도 db 실행을 해보면.
pid 뿐아니라 테이블 생성시 MYD, MYI, frm 파일 모두 실행권한이 660 ( -rw-rw----) 으로 되어버립니다.
이부분을 640 으로 조정하는 방법이 없을까요?
http://dev.mysql.com/doc/refman/5.0/en/environment-variables.html
의 UMASK부분을 참조하시면 될 것 같습니다.
일단 중요한 부분을 발췌해 보았습니다.
--------
The UMASK and UMASK_DIR variables, despite their names, are used as modes, not masks:
If UMASK is set, mysqld uses ($UMASK | 0600) as the mode for file creation, so that newly created files have a mode in the range from 0600 to 0666 (all values octal).
If UMASK_DIR is set, mysqld uses ($UMASK_DIR | 0700) as the base mode for directory creation, which then is AND-ed with ~(~$UMASK & 0666), so that newly created directories have a mode in the range from 0700 to 0777 (all values octal). The AND operation may remove read and write permissions from the directory mode, but not execute permissions.
MySQL assumes that the value for UMASK or UMASK_DIR is in octal if it starts with a zero.