You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by richard head <du...@hotmail.com> on 2008/01/25 03:13:51 UTC
[vfs] FTP Client Works, VFS Gives 553 Error
When moveTo() is called on the source FileObject, passing it the destination FileObject -which refers to the remote file, I receive an 553 Exception. This should not be the case, indeed the permissions do allow for writes.
Exception:
Exception in thread "main" org.apache.commons.vfs.FileSystemException: Could not copy "file:///root/watchit/test-file" to "ftp://mss:s0ftail@192.168.191.2/test".
at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:933)
at org.apache.commons.vfs.provider.AbstractFileObject.moveTo(AbstractFileObject.java:995)
at Move.main(Move.java:16)
Caused by: org.apache.commons.vfs.FileSystemException: Could not write to "ftp://mss:s0ftail@192.168.191.2/test".
at org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1267)
at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:416)
at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:399)
at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:100)
at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:924)
... 2 more
Caused by: org.apache.commons.vfs.FileSystemException: Cant open output connection for file "ftp://mss:s0ftail@192.168.191.2/test". Reason: "553 test: Permission denied.
".
at org.apache.commons.vfs.provider.ftp.FtpFileObject.doGetOutputStream(FtpFileObject.java:535)
at org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1259)
... 6 more
FTP Session:
[root@localhost watchit]# ftp 192.168.191.2
Connected to 192.168.191.2.
<snip ftp auth crap...>
ftp> ls -l
227 Entering Passive Mode (192,168,191,2,192,10)
150 Opening ASCII mode data connection for '/bin/ls'.
total 66
drwxrwx--- 2 mss mss 0 Nov 8 11:21 logs
drwxrwx--- 2 mss mss 19 Jan 10 11:41 scripts
drwxr-xr-x 2 mss mss 0 Jan 24 17:33 test
226 Transfer complete.
ftp> cd test
250 CWD command successful.
ftp> put test-file
local: test-file remote: test-file
227 Entering Passive Mode (192,168,191,2,192,11)
150 Opening BINARY mode data connection for 'test-file'.
226 Transfer complete.
50 bytes sent in 0.0098 seconds (5 Kbytes/s)
ftp> ls -l
227 Entering Passive Mode (192,168,191,2,192,12)
150 Opening ASCII mode data connection for '/bin/ls'.
total 3
-rw-r--r-- 1 mss mss 50 Jan 24 17:37 test-file
226 Transfer complete.
ftp> system
215 UNIX Type: L8 Version: BSD-199506
I have used this code to transfer files to several FTP servers, and have not had a problem until now. Any idea as to why VFS gives me a 553 when I clearly have permissions?
Thanks!
_________________________________________________________________
Shed those extra pounds with MSN and The Biggest Loser!
http://biggestloser.msn.com/
Setting ASCII mode in VFS
Posted by Suresh <su...@yahoo.com>.
By dafault VFS is in binary transfer mode.
Can anyone help ,How to set file tranfer mode to ASCII in VFS
Thanks,
Suresh
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org