JEUS/WEBTOB

[ WEBTOB ] 일반 사용자 계정 사용 ( 80, 443 포트)

정윤재 2021. 5. 2. 00:18

테스트 환경 

- WEBTOB5

- Linux

 

웹서버가 1 ~ 1024 사이의 포트를 사용하려고 할 때 일반 사용자 계정으로

띄우려고 하면 아래와 같은 오류가 발생 합니다.

[shonm@ansible1 ~]$ wsboot

Booting WebtoB on node (ansible1)
Welcome to WebtoB Demo system. It will expire on 2021-07-01
Today is 2021-05-01
Starting WSM at Sat May  1 23:31:41 2021
Starting HTL at Sat May  1 23:31:41 2021
Starting HTH at Sat May  1 23:31:41 2021
	 Current WebtoB Configuration:
		Number of client handlers (HTH) = 1
		Supported maximum user per node = 4051
		Supported maximum user per handler = 4051
[2021-05-01T23:31:41] [HTL(11319)] [F] [HTL-00048] bind error. Listen port (80) is in use or address (0.0.0.0) is invalid. Try to bind to that port again in 10 seconds.  errno=13(Permission denied)

 

이런 경우엔 아래와 같이 해주어야 합니다.

 

1. $WEBTOBDIR/config/http.m 파일에서

IPCPERM 값을 0777 또는 0770 로 변경 하여 아래와 같이 Node 절에 설정 해줍니다.

(wscfl -i http.m 으로 컴파일 해주세요)

 

   IPCPERM : 내부 주요 프로세스간 통신 (IPC) 에 사용되는 파일의 권한 설정

 

2. $WEBTOBDIR/bin 폴더의 htl 파일에 대해 아래와 같이 설정 해 줍니다. (root 계정으로 해주세요)

shell> chown root htl

shell> chmod u+s htl

 

htl : HTL 은 클라이언트와 WebtoB 간의 연결을 관리하는 Listener 프로세스

chmod +s 권한 : setuid 비트 설정 (root 로만 기동시킬수 있는 프로세스를 실행 시킬 때만 root 권한 부여)

 

 

3. $WEBTOBDIR/bin 에서 wsboot 로 기동시켜줍니다. (일반사용자 계정으로 해주세요)