[ 
https://issues.apache.org/jira/browse/SSHD-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15938999#comment-15938999
 ] 

Goldstein Lyor commented on SSHD-733:
-------------------------------------

Please specify what is meant by {quote}presented as file symlinks instead of 
directory symlinks{quote}. SSHD does not "present" anything as anything - it 
merely provides SFTP API. Please be *specific* in terms of the Java code - is 
it the SFTP {{Attributes}} that are wrong ? If so, please provide *exact* code 
that shows the reported values.

Furthermore {quote}create filesystem{quote} please provide *exact* commands 
that were used to create it as well as the reported {{ls -la}} output and any 
other information that shows the created files O/S attributes.

Last, but not least, AFAIK the [Java Files 
API|https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html] that s 
relevant to symbolic links speaks only of _target_ paths and has not concept of 
file/directory. The SSHD code provides whatever Java _Path_(s) provide - 
nothing more, nothing less. I am not aware of a pure-Java way that can 
distinguish between file and directory symlinks.

> SSHD server creates file symlinks instead of dir symlinks
> ---------------------------------------------------------
>
>                 Key: SSHD-733
>                 URL: https://issues.apache.org/jira/browse/SSHD-733
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>         Environment: Windows/Linux
>            Reporter: Marcin Kozakiewicz
>
> We use sshd for junit testing of sftp file transfers. 
> Scenario:
> 1.create filesystem:
> {code}
> ├── mem0
> │   └── mem0.txt
> ├── run -> mem0
> └── run2 -> mem0
> {code}
> 2. Start SSh server with given file system.
> code snippet from out project:
> {code}
> _server = SshServer.setUpDefaultServer();
>         _server.setHost("localhost");
>         _server.setPort(PORT);
>         _server.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
>         _server.setPasswordAuthenticator(new PasswordAuthenticator() {
>             @Override
>             public boolean authenticate(final String username, final String 
> password, final ServerSession session) {
>                 return USERNAME.equals(username) && PASSWORD.equals(password);
>             }
>         });
>         _server.setSubsystemFactories(singletonList(new 
> SftpSubsystemFactory()));
>         _server.setFileSystemFactory(new 
> VirtualFileSystemFactory(fileSystemPath));
>         _server.start();
> {code}
> 3. Connect to server with sftp client.
> Result:
> run and run2 symlinks are presented as file symlinks instead of directory 
> symlinks.
> Expected result:
> run and run2 are presented as directory symlinks.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to