proftpd를 설치하면서 환영메세지 문제..

tinywolf의 이미지

이곳을 포함해서 여기저기 돌아다니면서 ftp를 겨우 설치했습니다..

그 내용중에 welcome메세지를 설정하는 부분이 있었는데요.

제가 겪었던 것을 얘기하고 중간 중간 질문을 드리겠습니다.

기본적으로 이렇게 설정되어 있더군요.
DisplayLogin /etc/proftpd/welcome.msg
익명접속은 막아버린 후 제가 생성한 계정으로 접속해 보았더니 메세지가 나타나지 않았습니다.

그러다가 어느곳에서

Quote:
DefaultRoot를 설정해 버리면 그 폴더가 /가 되어 버리기 때문에 환영메세지가 나오지 않을 수 있습니다.

라는 글을 보고..

사용자의 홈폴더에다가 .ftpwelcome.msg라고 파일을 만들어준 다음에
DisplayLogin .ftpwelcome.msg
로 설정해 주니 정상적으로 환영 메세지가 나왔습니다.

확인하고 나서 /etc/skel/에도 복사해서 앞으로 생성되는 계정에 포함되도록 했죠.

여기서 첫번째 질문
제가 생각하기엔 아마도 안될 것같지만..
위와같이 'DefaultRoot ~'가 설정된 상태에서 환영메세지 파일을 저렇게 계정마다 따로 복사시키지 않고 하나의 파일로 할 수 있을까요?

저의 환영메세지 파일 .ftpwelcome.msg

************************************************
        Welcome to %V
        admin E-mail : %E
************************************************
    접속자      : %U
    로그인 시간 : %T
    접속 IP     : %R
    접속자 수   : 현재 (%N) / 최대 (%M)

    외부 사용자의 접근을 제한합니다.
    호스트당 1개의 접속만 허용합니다.

    웹호스팅 디렉토리는 html/입니다.
    현재 남은 용량은 %f입니다.


윈도우즈의 커맨드창에서 'ftp 218.xxx.xxx.xxx'로 접속을 해서 환영메세지가 깔끔하게 뜨는것을 확인하고.
바로 윈도우의 알FTP로 접속을 해 보았습니다.

알FTP도 최초 접속시 환영메세지를 화면에 보여주죠..
그런데 메세지창에 뜨는 것은 달랑..

Quote:
220 my ftp server

230-

우측 하단의 모든 메세지를 보여주는 로그에는 환영메세지가 찍혀 있지만 따로 보여주는 창에는 나타나지 않는 것입니다.

"이상하다 전에 여러줄 환영메세지 나오는델 가봤는데..."
하는 생각에 여기저기 익명 ftp에 접속을 해 보았습니다.

그러던중 인텔 익명ftp에 들어가 보니 다음과 같이 여러줄 환영메세지가 나오더군요.

Quote:
220 ftp2 FTP server (Version wu-2.6.1(1) Wed Aug 6 22:29:25 PDT 2003) ready.

230-***************************************************************

230-
230- Welcome to ftp.intel.com!
230-
230- For Intel product questions/comments/requests, please send mail to
... 절라 중략 ...
230- *** uploading them to the server. ***
230- **********************************************************
230-
230-***************************************************************
230-
230 Guest login ok, access restrictions apply.

proftpd 한국 사용자 그룹(http://proftpd.oops.org/)에도 들어가서 레퍼런스를 거의 전부 확인해 보았지만 여러줄 메세지에 대한 내용은 어디에도 없는 것같았습니다.
그리고 파일에 직접 '230-'를 각줄 첫부분에 넣어줬지만 효과가 없었구요.

여기서 두번째 질문
proftpd에는 여러줄 메세지에 대해 앞에 '230-'같은 식으로 prefix를 붙여주는 설정은 없는건가요?

이걸 해결하려고 여기저기 다니다가 알아낸 것 몇가지는..

제일 처음 접속하면 아이디 입력전에 나오는 메세지는
DisplayConnect /etc/proftpd/conf/connect.msg
를 설정하면 볼 수 있게 되고..

WOWLiNUX 어쩌고 저쩌고 하면서 ftp 버전도 같이 나오던 것은..
ServerIdent on "my ftp Server"
하면 바껴서 나온다는 것..

하아.. 여기저기 인터넷 뒤져가며 리눅스를 가지고 놀려니 재미도 있고 한편으론 힘들기도 하고 그러네요..

tinywolf의 이미지

해결했습니다..

1번의 환영 메세지를 하나로 할 수 없는가는..
/home/디렉토리를 루트로 함으로써 해결했구요.
DefaultRoot /home

2번의 여러줄 메세지는 레퍼런스를 다시 꼼꼼히 확인해보니 MultilineRFC2228이란게 있더군요..
MultilineRFC2228 on

음.. 깔끔하게 잘 나오니 보기 좋습니다.. ㅎㅎ

제 설정 파일을 참고 삼아 올려드립니다..

proftpd.conf

# ProFTPD configuration file. Need more inormation of configuration,
# See the References in '/usr/share/doc/proftpd-{version}/' directory
# If u have any question, visit our Web Site. http://www.wowlinux.com
# or http://proftpd.oops.org (ProFTPD korean user group)
# Thank you - WOWL!NUX.COM

ServerName				"My FTP Server"
ServerType				standalone
# ServerType				inetd
DefaultServer			on
ServerAdmin				ftp@tinywolf.com
ServerIdent				on	"TinyWolf's FTP Server"
Port					21
Umask					022
MaxInstances			30
User					nobody
Group					nobody
UseReverseDNS			off
IdentLookups			off
AuthPAMAuthoritative	on
RootLogin				off
DenyFilter				\*.*/
DeferWelcome			on
TimesGMT				off
MultilineRFC2228		on
# DefaultRoot      		~
DefaultRoot				/home

AllowOverwrite          on
AllowRetrieveRestart    on
AllowStoreRestart       on

# RateReadBPS			256
# RateReadFreeBytes		5120
# RateReadHardBPS		on

TimeoutIdle				0
TimeoutNoTransfer		0
TimeoutLogin			300

MaxClients				10	"Sorry, maximum users %m -- try again later. 사용자가 많습니다 -- 잠시후 다시 시도해 주십시오."
MaxClientsPerHost 		2	"Only one client is allowed to connect! 오직 하나의 연결만 가능합니다!"

DisplayConnect			/home/.proftpd/connect.msg
DisplayLogin			/.proftpd/welcome.msg
DisplayFirstChdir		.message

<Directory /*>
  AllowOverwrite		on
</Directory>

<Anonymous ~ftp>
  User					ftp
  Group					ftp
  UserAlias				anonymous ftp
  MaxClients			10	"Sorry, maxium users %m -- try again later. 사용자가 많습니다 -- 잠시후 다시 시도해 주십시오."
  MaxClientsPerHost		1	"Sorry, Allow only one client for host. 오직 하나의 연결만 가능합니다."
  DisplayLogin			.ftpwelcome.msg
  DisplayFirstChdir		.message
  RequireValidShell		off

# HideUser				root
# HideGroup				root

# Limit LOGIN
  <Limit LOGIN>
   DenyAll
  </Limit>

# Limit WRITE everywhere in the anonymous chroot
  <Limit WRITE>
   DenyAll
  </Limit>

# Anonymous's Uploads Directory
  <Directory incoming/*>
    AllowOverwrite			on
    AllowRetrieveRestart	on
    AllowStoreRestart		on
    <Limit DELE STOR RMD MKD>
      DenyAll
    </Limit>
    <Limit READ>
      AllowAll
    </Limit>
  </Directory>

# Anonymous's Public Directory
  <Directory pub/*>
    <Limit READ>
      AllowAll
    </Limit>
    <Limit STOR DELE RMD MKD>
      DenyAll
    </Limit>
  </Directory>

</Anonymous>

connect.msg


************************************************
        Welcome to %V
        admin E-mail : %E
************************************************
    익명 접속을 허용하지 않습니다.
    Anonymous user cannot login this server. 

welcome.msg


************************************************
        Welcome to %V
        admin E-mail : %E
************************************************
    접속자      : %U
    로그인 시간 : %T
    접속 IP     : %R
    접속자 수   : 현재 (%N) / 최대 (%M)

    외부 사용자의 접근을 제한합니다.
    호스트당 1개의 접속만 허용합니다.

    웹호스팅 디렉토리는 %C/html/입니다.
    현재 남은 용량은 %f입니다.

ㅡ_ㅡ;

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.