问题
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