VFS2 Error cannot delete file and could not get the groups id of the current user (error code: -1)

岁酱吖の 提交于 2020-01-24 03:26:29

问题


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:

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)

Properties folder:

Could it dependens on the owner/groups ?


回答1:


This is a known issue - see https://issues.apache.org/jira/browse/VFS-617 (also applies to isReadable).

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).

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.



来源:https://stackoverflow.com/questions/48638827/vfs2-error-cannot-delete-file-and-could-not-get-the-groups-id-of-the-current-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!