반응형

local file을 크롬 브라우저로 보는 상황에서

A 문서에서 B 문서를 띄우고 (Parent Window - Child Window) 

B 문서에서 A 문서의 DOM으로 접속하여 데이터를 보내려는 경우 아래와 같은 에러 메세지를 개발자콘솔창에서 볼 수 있다. 


Uncaught SecurityError: Blocked a frame with origin "null" from accessing a frame with origin "null". Protocols, domains, and ports must match. 

 


실제 웹서버로 올려서 실행하는 경우에는 발생하지 않는 문제이나 개발자 테스트 중에 발생 될 수 있는 문제이며, 

파이어폭스에서는 정상적으로 수행이 된다. 

이는 크롬의 보안 정책이 특정 버전 이후로 강화되어서 라고 한다. 


대처 방법으로는 크롬실행시 아래와 같은 옵션을 추가하면 된다. 


--disable-web-security 

 


혹은 


크롬 웹스토어에서 확장프로그램으로 아래 기능을 추가하면 된다. 


 Allow-Control-Allow-Origin: *

 


링크는 아래와 같다. 


https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi


위 방법은 Ajax 로 다른 도메인(cross domain)에 접근하면 문제가 발생한다고 하며 동일하게 해결 할 수도 있다. 


reference : http://www.chromium.org/developers/how-tos/run-chromium-with-flags

reference : http://jongkwang.com/?p=852

 

출처 : http://redcarrot.tistory.com/155

반응형
반응형
포트 TCP UDP 설명 상태
0 UDP 예약됨; 사용하지 않음 공식
1 TCP TCPMUX (TCP 포트 서비스 멀티플렉서) 공식
7 TCP UDP ECHO 프로토콜 공식
9 TCP UDP DISCARD 프로토콜 공식
13 TCP UDP DAYTIME 프로토콜 공식
17 TCP QOTD (Quote of the Day) 프로토콜 공식
19 TCP UDP CHARGEN (Character Generator) 프로토콜 - 원격 오류 수정 공식
20 TCP FTP (파일 전송 프로토콜) - 데이터 포트 공식
21 TCP FTP - 제어 포트 공식
22 TCP SSH (Secure Shell) - ssh scp, sftp같은 프로토콜 및 포트 포워딩 공식
23 TCP 텔넷 프로토콜 - 암호화되지 않은 텍스트 통신 공식
24 TCP 개인메일 시스템 공식
25 TCP SMTP (Simple Mail Transfer Protocol) - 이메일 전송에 사용 공식
37 TCP UDP TIME 프로토콜 공식
49 UDP TACACS 프로토콜 공식
53 TCP UDP DNS (Domain Name Syetem) 공식
67 UDP BOOTP (부트스트랩 프로토콜) 서버. DHCP로도 사용 공식
68 UDP BOOTP (부트스트랩 프로토콜) 서버. DHCP로도 사용 공식
69 UDP TFTP 공식
70 TCP 고퍼 프로토콜 공식
79 TCP Finger 프로토콜 공식
80 TCP UDP HTTP (HyperText Transfer Protocol) - 웹 페이지 전송 공식
88 TCP 커베로스 - 인증 에이전트 공식
109 TCP POP2 (Post Office Protocol version 2) - 전자우편 가져오기에 사용 공식
110 TCP POP3 (Post Office Protocol version 3) - 전자우편 가져오기에 사용 공식
113 TCP ident - 예전 서버 인증 시스템, 현재는 IRC 서버에서 사용자 인증에 사용 공식
119 TCP NNTP (Network News Transfer Protocol) - 뉴스 그룹 메시지 가져오기에 사용 공식
123 UDP NTP (Network Time Protocol) - 시간 동기화 공식
139 TCP 넷바이오스 공식
143 TCP IMAP4 (인터넷 메시지 접근 프로토콜 4) - 이메일 가져오기에 사용 공식
161 UDP SNMP (Simple Network Management Protocol) - Agent 포트 공식
162 UDP SNMP - Manager 포트 공식
179 TCP BGP (Border Gateway Protocol) 공식
194 TCP IRC (Internet Relay Chat) 공식
389 TCP LDAP (Lightweight Directory Access Protocol) 공식
443 TCP HTTPS - HTTP over SSL (암호화 전송) 공식
445 TCP Microsoft-DS (액티브 디렉터리, 윈도 공유, Sasser-worm, Agobot, Zobotworm) 공식
445 UDP Microsoft-DS SMB 파일 공유 공식
465 TCP SSL 위의 SMTP - Cisco 프로토콜과 충돌 비공식, 충돌
514 UDP syslog 프로토콜 - 시스템 로그 작성 공식
515 TCP LPD 프로토콜 - 라인 프린터 데몬 서비스 공식
540 TCP UUCP (Unix-to-Unix Copy Protocol) 공식
542 TCP UDP 상용 (Commerce Applications) (RFC maintained by: Randy Epstein [repstein at host.net]) 공식
587 TCP email message submission (SMTP) (RFC 2476) 공식
591 TCP 파일메이커 6.0 Web Sharing (HTTP Alternate, see port 80) 공식
636 TCP SSL 위의 LDAP (암호화된 전송) 공식
666 TCP id 소프트웨어 멀티플레이어 게임 공식
873 TCP rsync 파일 동기화 프로토콜 공식
981 TCP SofaWare Technologies Checkpoint Firewall-1 소프트웨어 내장 방화벽의 원격 HTTPS 관리 비공식
993 TCP SSL 위의 IMAP4 (암호화 전송) 공식
995 TCP SSL 위의 POP3 (암호화 전송) 공식
25565 TCP Minecraft의 기본 포트 비공식

 

반응형
반응형

500 OOPS: priv_sock_get_cmd or 500 OOPS: vsftpd: refusing to run with writable root inside chroot()

500 OOPS: priv_sock_get_cmd

macbook:~ PJunior$ <strong>ftp username@example.com</strong>
Connected to <strong>example.com</strong>.
<strong>500 OOPS: priv_sock_get_cmd</strong>
ftp: Can't connect or login to host `example.com'

Open /etc/vsftpd.conf and at the end  add

seccomp_sandbox=NO

and restart the Server:

sudo service vsftpd restart

500 OOPS: vsftpd: refusing to run with writable root inside chroot()

macbook:~ PJunior$ <strong>ftp username@example.com</strong>
Connected to <strong>example.com</strong>.
<strong>500 OOPS: vsftpd: refusing to run with writable root inside chroot()</strong>
ftp: Can't connect or login to host `example.com'

Open /etc/vsftpd.conf and at the end  add

 allow_writeable_chroot=YES

and restart the Server:

sudo service vsftpd restart

출처 : http://my.dude.kr/wp/?p=240

반응형
반응형

SSH 접속 후 로그인 정보까지 보낸 이후 Shell이 뜨는 속도가 느린 경우가 있습니다.

일반적으로 SSH에 접속을 시도할 때 SSH 데몬에서 DNS를 통해 접속하는 호스트를 확인하는 절차를 거치기 때문입니다.

이 과정을 생략하면 SSH 접속 속도를 향상시킬 수 있습니다.

텍스트 에디터로 /etc/ssh/sshd_config 파일을 열고, 다음 옵션을 수정해 줍니다.

 
/etc/ssh/sshd_config
UseDNS no

저장한 다음 SSH 데몬을 재시작해줍니다.

 
sudo service ssh restart

이렇게 하면 기본적으로 DNS 체크를 생략하게 됩니다.

특정 IP에서 접속하는 경우에만 DNS 검사를 생략하려면 /etc/hosts 파일에 접속하는 IP를 기술해주면 됩니다.

 

 

출처 : http://tuwlab.com/ece/9399

반응형
반응형

 

preg_match_all('/(\w+)=([^&]+)/', $_SERVER["QUERY_STRING"], $pairs);
  $_GET = array_combine($pairs[1], $pairs[2]);
반응형
반응형

jQuery에서 for, while 문과 비슷한 역할을 하는 each 메소드 사용 시

break, continue와 같은 프로세스를 수행해야 할 때가 있다.

 

그럴 때 return true;continue와 같은 역할을, return false; break와 같은

역할을 수행한다.

 

예제 >>

 

$('#loop').each ( function() {

  if ( i==0 ) return true; // continue;

  else return false; // break;

} );

 

 

출처 :http://dhplanner.blogspot.kr/2009/06/jquery-each-%EB%A9%94%EC%86%8C%EB%93%9C-%EC%82%AC%EC%9A%A9%EC%8B%9C-break-continue-%EC%82%AC%EC%9A%A9.html

반응형
반응형

Could be that although you have 755/777 permissions, SELinux is blocking httpd from writing/creating dirs.

Try:

chcon -R -t httpd_sys_content_t /path/to/www
chcon -R -t httpd_sys_content_rw_t /path/to/www/dir/for/rw

Further info: http://wiki.centos.org/TipsAndTricks/SelinuxBooleans

반응형
반응형

SSH에서 root 으로 접속후 아래 명령을 입력.


setsebool -P httpd_can_sendmail=1


반응형

+ Recent posts