我使用sun.net.ftp来连接linux的vsftp时,出现如下的异常(在windows下是没有的)
java.io.FileNotFoundException: PORT 192,168,0,80,9,205: 550 Permission denied.
at sun.net.ftp.FtpClient.readReply(FtpClient.java:236)
at sun.net.ftp.FtpClient.issueCommand(FtpClient.java:193)
at sun.net.ftp.FtpClient.openDataConnection(FtpClient.java:434)
at sun.net.ftp.FtpClient.put(FtpClient.java:594)
at org.lab24.util.FtpTool.processfile(FtpTool.java:193)
at org.lab24.util.FtpTool.upload(FtpTool.java:116)
at org.lab24.spider.Spider.run(Spider.java:55)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
at java.lang.Thread.run(Thread.java:619)
exception e in ftp upload(): java.io.FileNotFoundException: PORT 192,168,0,80,9,205: 550 Permission denied.
后来查过网上的解决方案,才知道:
该类默认使用的是Port模式传输数据,但实际上Linux配的是Pasv模式,所以传不过去,修改办法:
ftpclient.sendServer("quote PASV");
设置一下传输模式就可以传了。
分享到:
相关推荐
出现这种问题, ①首先检查用户对应的角色名,然后看路径设置是否正确,有没有相关的权限,如果这些都没问题,然后就尝试下面的操作: ②重起FTP服务,最好从服务里面重启(不能根本解决); ③重新设置Server-U帐号和...
Delphi ftp 报Permission denied 问题.txt.Delphi ftp 报Permission denied 问题.txt
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http:///var/run/docker.sock/v1.40/images/json: dial unix /var/run/docker.sock: connect: ...
Programming Excel with VBA and .NET Preface Part I: Learning VBA Chapter 1. Becoming an Excel Programmer Section 1.1. Why Program? Section 1.2. Record and Read Code Section 1.3. Change ...
主要介绍了Nginx报403 forbidden错误 (13: Permission denied)的解决办法,引起nginx 403 forbidden通常是三种情况:一是缺少索引文件,二是权限问题,三是SELinux状态。具体内容详情大家可以参考下本
PORT 192,168,10,144,210,113 200 PORT command successful. Consider using PASV. ---> LIST 425 Failed to establish connection. # 被动模式 $ ftp -v -p -d 211.159.185.198 Connected to 211.159....
sqlplus libclntsh.so.11.1 Permission denied 解决方法
手机图案解锁 permission denied解决方案
昨天一客户反应他的CuteFTP只能建文件夹,没法删除及上传文件
stack Error: EACCES: permission denied, mkdir ‘/Users/mac-pro/.nvm/versions/node/v10.16.0/lib/node_modules/webpack/node_modules/fsevents/build’ gyp ERR! System Darwin 19.3.0 gyp ERR! command “/...
关于操作db文件导出Failed to pull selection: open failed: Permission denied问题的处理方法在遇到这个问题之前,你可能连data这个目录都打不开。。 对此,解决办法是去到安卓的adb目录\Android\sdk\platform-...
2018/07/22 00:46:36 [crit] 15890#15890: *74 connect() to unix:/root/jianshuvue/jianshu.sock failed (13: Permission denied) while connecting to upstream, client: 120.42.13.98, server: jianshu....
Json.NET http://james.newtonking.com/projects/json-net.aspx http://www.codeplex.com/json/ Description: The Json.NET library makes working with JSON formatted data in .NET simple. Quickly read and ...
”Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http:///var/run/docker.sock/v1.26/images/json: dial unix /var/run/docker.sock: connect: ...
问题描述: 在使用git 进行提交时, 出现上面这个报错, 导致无法提交. 报错大致意思就是创建index.lock文件失败,因为已经存在index.lock文件了. index.lock文件是在.git下面, 而.git是一般是隐藏的, 那么可以通过以下...
第一步 重新生成ssh ssh-keygen -t rsa -C “这里需要填写邮箱。我填写的是我的绑定主邮箱。我想其他邮箱也是可以的,只不过我没有测试。” 第二步 查看你生成的公钥 cat ~/.ssh/id_rsa.pub 然后我们就可以看到我们...
ORACLE 对表空间进行的详细操作,经典!
主要给大家介绍了在Nginx中报错:13: Permission denied与111: Connection refused的解决方法,文中介绍的非常详细,相信对大家具有一定的参考价值,需要的朋友们下面来一起看看吧。