commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Woods (JIRA)" <>
Subject [jira] [Commented] (VFS-617) isReadable fails if unable to determine group identity
Date Fri, 22 Jul 2016 17:34:20 GMT


Joshua Woods commented on VFS-617:


I'm not very familiar with the code, but in SftpFileSystem::getGroupsIds, shouldn't the command-line
call "id -G" normally return non-zero's when it finds group ID's?  The exception is being
thrown when the id is non-zero.  Hope this helps!


> isReadable fails if unable to determine group identity
> ------------------------------------------------------
>                 Key: VFS-617
>                 URL:
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: Windows 7 Java 7. Failure occured connecting via SFTP to a Synology
box running DSM 6.
>            Reporter: Tim Nickels
> The doIsReadable method of SftpFileObject throws an exception if the system cannot identify
group/owner permissions....... 
> Exception in thread "main" org.apache.commons.vfs2.FileSystemException: Could not determine
if file "sftp://myURI" is readable.
> 	at org.apache.commons.vfs2.provider.AbstractFileObject.isReadable(
> 	at com.avenca.vfs.VFSUtils.main(
> Caused by: com.jcraft.jsch.JSchException: Could not get the groups id of the current
user (error code: 1)
> 	at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getGroupsIds(
> 	at org.apache.commons.vfs2.provider.sftp.SftpFileObject.getPermissions(
> 	at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doIsReadable(
> 	at org.apache.commons.vfs2.provider.AbstractFileObject.isReadable(
> The problem is the method is using 
> return getPermissions(true).isReadable()
> The folder *is* readable without these permissions, and so should be set to
> return getPermissions(false).isReadable()
> Which correctly allows the system to identify a readable folder without adding unnecessary

This message was sent by Atlassian JIRA

View raw message