2012-02-14 2 views
1

파일을 ftp 서버로 복사하려고 할 때 550 파일 이름이 잘못되었습니다. 연결되어 로그인 중입니다.550 파일 이름 ftp에서 잘못된 오류

ftp.connect(server); 
ftp.login(user, password); 

String filename = "testing.txt"; 
fis = new FileInputStream(filename); 
File file = new File(filename); 
FileInputStream fis = new FileInputStream(file); 
String cwd =client.printWorkingDirectory(); 

boolean check = ftp.storeFile("C:\\test\\"+filename, fis); 
if(!check)System.out.println(ftp.getReplyString()); 

어디에서 잘못 될지 알려주실 수 있습니까?

감사

나는 파일 권한의 그 단지의 경우를 생각한다.

+0

가능한 중복 [vsftpd - 서버에 파일을 업로드 할 수 없습니다. 오류 553] (http://stackoverflow.com/questions/18749681/vsftpd-cannot-upload-files-to-the-server-error-553) – tripleee

답변

2

정규화 된 이름을 보내고 있습니다. 개의 파일 이름 만 FTP 서버에 보내려는 것 같습니다.

+0

예제를 제공해 주시겠습니까? 내가 'ftp.storeFile (filename, fis);'을 실행하면 기본 디렉토리에 저장되지만, 나는 그것을 원하지 않는다. 'ftp.changeWorkingDirectory ("C :/test");'도 작동하지 않습니다. – rv1822

관련 문제