VFS2错误无法删除文件,并且无法获取当前用户的组ID(错误代码:-1) [英] VFS2 Error cannot delete file and could not get the groups id of the current user (error code: -1)
问题描述
我正在使用VFS2通过SFTP协议将文件导入并将文件导入文件夹. 但我收到一个错误.图片如下我的代码:
I'm using VFS2 to take and import files into the folders by SFTP protocol. But I'm obtaining an Error. Picture below my code:
进入所有正在查看此错误的文件的日志:
Into the log for all files I'm watching this error:
错误序列为: 1)无法删除文件 2)无法确定文件 3)原因:com.jcraft.jsch.JSchException:无法获取当前用户的组ID(错误代码:-1)
The error sequence is: 1) cannot delete file 2) Could not determine if file 3) Caused by: com.jcraft.jsch.JSchException: Could not get the groups id of the current user (error code: -1)
属性文件夹:
它可以取决于所有者/组吗?
Could it dependens on the owner/groups ?
推荐答案
This is a known issue - see https://issues.apache.org/jira/browse/VFS-617 (also applies to isReadable).
此问题的根本原因是两件事之一:SFTP服务器不允许客户端执行命令("exec");或者SFTP服务器不允许客户端执行命令("exec").或SFTP服务器缺少"id"命令(例如,这是Windows服务器).
The root cause of the issue is one of two things - either the SFTP server doesn't allow commands to be executed ("exec") by the client; or the SFTP server is missing the "id" command (e.g. it's a Windows server).
此处提出了git pull请求: https://github.com/apache/commons-vfs/pull/27 ,但是在将其包含在VFS中之前,需要进行单元测试.
A git pull request has been raised here: https://github.com/apache/commons-vfs/pull/27 but it requires unit tests before it will be included in VFS.
这篇关于VFS2错误无法删除文件,并且无法获取当前用户的组ID(错误代码:-1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!