110.11. 단계별로 디렉터리 변경


Camel FTP는 파일 사용(예: 다운로드) 또는 파일 생성(예: 업로드)을 수행할 때 traversing 디렉토리 측면에서 두 가지 모드로 작동할 수 있습니다.

  • stepwise
  • 단계적이 아닙니다.

문제 및 보안 문제에 따라 하나를 선택할 수 있습니다. 일부 Camel 최종 사용자는 stepwise를 사용하는 경우에만 파일을 다운로드할 수 있으며, 다른 사용자는 다운로드할 수 없는 경우에만 다운로드할 수 있습니다. 최소 Camel 2.6 이후 선택할 수 있습니다.

Camel 2.0 - 2.5에는 다음과 같은 모드가 하나만 있습니다.

  • 2.5이 아닌 경우
  • 2.5 stepwise

Camel 2.6 이후부터는 동작을 제어하는 데 사용할 수 있는 옵션 단계 가 있습니다.

디렉토리를 단계별로 변경하는 것은 대부분의 경우 사용자가 홈 디렉토리로 제한되고 홈 디렉터리가 "/"로 보고될 때만 작동합니다.

둘 사이의 차이점은 예시와 함께 가장 잘 설명되어 있습니다. 원격 FTP 서버에 다음 디렉터리 구조가 있다고 가정합니다. 파일을 트래버스하고 다운로드해야 합니다.

/
/one
/one/two
/one/two/sub-a
/one/two/sub-b
Copy to Clipboard Toggle word wrap

그리고 각각의 하위-a(a.txt) 및 sub-b(b.txt) 폴더에 파일이 있습니다.

110.11.1. stepwise=true(기본 모드) 사용

TYPE A
200 Type set to A
PWD
257 "/" is current directory.
CWD one
250 CWD successful. "/one" is current directory.
CWD two
250 CWD successful. "/one/two" is current directory.
SYST
215 UNIX emulated by FileZilla
PORT 127,0,0,1,17,94
200 Port command successful
LIST
150 Opening data channel for directory list.
226 Transfer OK
CWD sub-a
250 CWD successful. "/one/two/sub-a" is current directory.
PORT 127,0,0,1,17,95
200 Port command successful
LIST
150 Opening data channel for directory list.
226 Transfer OK
CDUP
200 CDUP successful. "/one/two" is current directory.
CWD sub-b
250 CWD successful. "/one/two/sub-b" is current directory.
PORT 127,0,0,1,17,96
200 Port command successful
LIST
150 Opening data channel for directory list.
226 Transfer OK
CDUP
200 CDUP successful. "/one/two" is current directory.
CWD /
250 CWD successful. "/" is current directory.
PWD
257 "/" is current directory.
CWD one
250 CWD successful. "/one" is current directory.
CWD two
250 CWD successful. "/one/two" is current directory.
PORT 127,0,0,1,17,97
200 Port command successful
RETR foo.txt
150 Opening data channel for file transfer.
226 Transfer OK
CWD /
250 CWD successful. "/" is current directory.
PWD
257 "/" is current directory.
CWD one
250 CWD successful. "/one" is current directory.
CWD two
250 CWD successful. "/one/two" is current directory.
CWD sub-a
250 CWD successful. "/one/two/sub-a" is current directory.
PORT 127,0,0,1,17,98
200 Port command successful
RETR a.txt
150 Opening data channel for file transfer.
226 Transfer OK
CWD /
250 CWD successful. "/" is current directory.
PWD
257 "/" is current directory.
CWD one
250 CWD successful. "/one" is current directory.
CWD two
250 CWD successful. "/one/two" is current directory.
CWD sub-b
250 CWD successful. "/one/two/sub-b" is current directory.
PORT 127,0,0,1,17,99
200 Port command successful
RETR b.txt
150 Opening data channel for file transfer.
226 Transfer OK
CWD /
250 CWD successful. "/" is current directory.
QUIT
221 Goodbye
disconnected.
Copy to Clipboard Toggle word wrap

단계별가 활성화되어 있는 경우를 볼 수 있듯이 CD xxx를 사용하여 디렉터리 구조를 이동합니다.

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat