Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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: enter image description here

Into the log for all files I'm watching this error:

enter image description here

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: enter image description here

Could it dependens on the owner/groups ?

like image 757
Stefano Avatar asked Feb 06 '18 08:02

Stefano


1 Answers

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.

like image 163
simonalexander2005 Avatar answered Oct 26 '22 09:10

simonalexander2005