IT
-
mysql - 유저 생성과 권한 부여하기프로그래밍/DB 2015. 4. 25. 20:19
참고사이트https://bharath256.wordpress.com/2008/12/08/access-denied-for-user-root-to-database/https://dev.mysql.com/doc/refman/5.0/en/adding-users.htmlhttps://dev.mysql.com/doc/refman/5.1/en/grant.htmlhttps://dev.mysql.com/doc/refman/5.0/en/connection-access.html 우선 사용자를 생성하기 위해 console에서 root로 mysql를 실행한다. mysql -u root -p (암호 입력) 유저 생성 명령은 기본적으로 아래와 같다. CREATE USER 'username'@'host' IDENTIFIED BY '..
-
서버 보안 - 아파치에서 디렉토리 리스팅 막기프로그래밍/서버관리 2015. 4. 16. 23:55
아파치 설치시 기본적으로 디렉토리 리스팅이허용되어 있는데그럴경우 아래와 같이 웹 브라우저에서 웹 디렉토리의 하부 디렉토리에 직접 접근할 수 있어보안에 문제가 될 수 있어 리스팅 기능을 막아놓는 것이 좋다. 리스팅 기능을 막기위해 아파치 설정 파일을 수정해야 한다. Ubuntu에서 아파치 설정 파일 기본 위치 apache :/etc/apache/httpd.conf apache2: /etc/apache2/apache2.conf Centos에서 아파치 설정 파일 기본 위치 apache: /etc/httpd/conf/httpd.conf 아파치 설정 파일에서 Options 라인을 찾아 Indexes를 제거 한다. apache 2 Options Indexes FollowSymLinks AllowOverride No..
-
리눅스 - bash: iptables: command not found프로그래밍/Linux 2015. 3. 23. 22:08
리눅스에서 iptables 내용을 확인하려고 했는데 아래와 같이 에러 메세지가 나왔다. # iptables -Lbash: iptables: command not found iptables의 위치가 PATH에 등록되어 있지 않아 위치를 찾지 못하고 있다. iptables는 /sbin/ 아래 위치하고 있다. 이 위치를 $PATH에 추가해둔다. sbin]$ ll ip*-rwxr-xr-x 1 root root 169992 2월 23 2012 ip-rwxr-xr-x 1 root root 59472 2월 23 2012 ip6tables-rwxr-xr-x 1 root root 62968 2월 23 2012 ip6tables-restore-rwxr-xr-x 1 root root 62824 2월 23 2012 ip6ta..