[jira] [Created] (VFS-436) VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (VFS-436) VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked

ASF GitHub Bot (Jira)
Jason created VFS-436:
-------------------------

             Summary: VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked
                 Key: VFS-436
                 URL: https://issues.apache.org/jira/browse/VFS-436
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 2.0
         Environment: java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)

Linux version 2.6.18-238.el5 ([hidden email]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Thu Jan 13 15:51:15 EST 2011

            Reporter: Jason
            Priority: Critical


With the setting below, VFS doesn't pull the ftp directory successfully.

Attempt to pull with
ftp://root:password@ip:/softLinkTest/yes

yes directory has the following info
lrwxrwxrwx  1 root root   10 Sep 13 13:35 yes -> /root/tmp/

When it runs through the getType() method after knowing it is a symbolic link, it tries to find the real directory's children but will return an empty array even though there's files listed under.

I debugged through the source code, the reason is caused by the fix to 307 in FTPClientWrapper line 134

        // VFS-307: no check if we can simply list the files, this might fail if there are spaces in the path
  files = getFtpClient().listFiles(relPath);
    if (FTPReply.isPositiveCompletion(getFtpClient().getReplyCode()))
                {
                    return files;
                }

If those lines are removed, it will work successfully.


Recommend to remove those lines




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (VFS-436) VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked

ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/VFS-436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason updated VFS-436:
----------------------

    Priority: Blocker  (was: Critical)
   

> VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked
> --------------------------------------------------------------------------------------------
>
>                 Key: VFS-436
>                 URL: https://issues.apache.org/jira/browse/VFS-436
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: java version "1.7.0_02"
> Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
> Linux version 2.6.18-238.el5 ([hidden email]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Thu Jan 13 15:51:15 EST 2011
>            Reporter: Jason
>            Priority: Blocker
>
> With the setting below, VFS doesn't pull the ftp directory successfully.
> Attempt to pull with
> ftp://root:password@ip:/softLinkTest/yes
> yes directory has the following info
> lrwxrwxrwx  1 root root   10 Sep 13 13:35 yes -> /root/tmp/
> When it runs through the getType() method after knowing it is a symbolic link, it tries to find the real directory's children but will return an empty array even though there's files listed under.
> I debugged through the source code, the reason is caused by the fix to 307 in FTPClientWrapper line 134
>         // VFS-307: no check if we can simply list the files, this might fail if there are spaces in the path
>   files = getFtpClient().listFiles(relPath);
>     if (FTPReply.isPositiveCompletion(getFtpClient().getReplyCode()))
>        {
>            return files;
>        }
> If those lines are removed, it will work successfully.
> Recommend to remove those lines

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (VFS-436) VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/VFS-436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason updated VFS-436:
----------------------

    Description:
With the setting below, VFS doesn't pull the ftp directory successfully.

Attempt to pull with
ftp://root:password@ip:/softLinkTest/yes

yes directory has the following info
lrwxrwxrwx  1 root root   10 Sep 13 13:35 yes -> /root/tmp/

When it runs through the getType() method after knowing it is a symbolic link, it tries to find the real directory's children but will return an empty array even though there's files listed under.

I debugged through the source code, the reason is caused by the fix to 307 in FTPClientWrapper line 134

        // VFS-307: no check if we can simply list the files, this might fail if there are spaces in the path
  files = getFtpClient().listFiles(relPath);
    if (FTPReply.isPositiveCompletion(getFtpClient().getReplyCode()))
                {
                    return files;
                }

If those lines are removed, it will work successfully.

The issue occurs when I set builder.setUserDirIsRoot( opts, true ). It works fine when it sets it to false.

Recommend to remove those lines




  was:
With the setting below, VFS doesn't pull the ftp directory successfully.

Attempt to pull with
ftp://root:password@ip:/softLinkTest/yes

yes directory has the following info
lrwxrwxrwx  1 root root   10 Sep 13 13:35 yes -> /root/tmp/

When it runs through the getType() method after knowing it is a symbolic link, it tries to find the real directory's children but will return an empty array even though there's files listed under.

I debugged through the source code, the reason is caused by the fix to 307 in FTPClientWrapper line 134

        // VFS-307: no check if we can simply list the files, this might fail if there are spaces in the path
  files = getFtpClient().listFiles(relPath);
    if (FTPReply.isPositiveCompletion(getFtpClient().getReplyCode()))
                {
                    return files;
                }

If those lines are removed, it will work successfully.


Recommend to remove those lines




   

> VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked
> --------------------------------------------------------------------------------------------
>
>                 Key: VFS-436
>                 URL: https://issues.apache.org/jira/browse/VFS-436
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: java version "1.7.0_02"
> Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
> Linux version 2.6.18-238.el5 ([hidden email]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Thu Jan 13 15:51:15 EST 2011
>            Reporter: Jason
>            Priority: Blocker
>
> With the setting below, VFS doesn't pull the ftp directory successfully.
> Attempt to pull with
> ftp://root:password@ip:/softLinkTest/yes
> yes directory has the following info
> lrwxrwxrwx  1 root root   10 Sep 13 13:35 yes -> /root/tmp/
> When it runs through the getType() method after knowing it is a symbolic link, it tries to find the real directory's children but will return an empty array even though there's files listed under.
> I debugged through the source code, the reason is caused by the fix to 307 in FTPClientWrapper line 134
>         // VFS-307: no check if we can simply list the files, this might fail if there are spaces in the path
>   files = getFtpClient().listFiles(relPath);
>     if (FTPReply.isPositiveCompletion(getFtpClient().getReplyCode()))
>        {
>            return files;
>        }
> If those lines are removed, it will work successfully.
> The issue occurs when I set builder.setUserDirIsRoot( opts, true ). It works fine when it sets it to false.
> Recommend to remove those lines

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (VFS-436) VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/VFS-436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason updated VFS-436:
----------------------

    Description:
With the setting below, VFS doesn't pull the ftp directory successfully.

Attempt to pull with
ftp://root:password@ip:/softLinkTest/yes

yes directory has the following info
lrwxrwxrwx  1 root root   10 Sep 13 13:35 yes -> /root/tmp/

I set builder.setUserDirIsRoot( opts, true ). It works fine when it sets it to false.

When it runs through the getType() method after knowing it is a symbolic link, it tries to find the real directory's children but will return an empty array even though there's files listed under.

I debugged through the source code, the reason is caused by the fix to 307 in FTPClientWrapper line 134

        // VFS-307: no check if we can simply list the files, this might fail if there are spaces in the path
  files = getFtpClient().listFiles(relPath);
    if (FTPReply.isPositiveCompletion(getFtpClient().getReplyCode()))
                {
                    return files;
                }

If those lines are removed, it will work successfully.

Recommend to remove those lines




  was:
With the setting below, VFS doesn't pull the ftp directory successfully.

Attempt to pull with
ftp://root:password@ip:/softLinkTest/yes

yes directory has the following info
lrwxrwxrwx  1 root root   10 Sep 13 13:35 yes -> /root/tmp/

When it runs through the getType() method after knowing it is a symbolic link, it tries to find the real directory's children but will return an empty array even though there's files listed under.

I debugged through the source code, the reason is caused by the fix to 307 in FTPClientWrapper line 134

        // VFS-307: no check if we can simply list the files, this might fail if there are spaces in the path
  files = getFtpClient().listFiles(relPath);
    if (FTPReply.isPositiveCompletion(getFtpClient().getReplyCode()))
                {
                    return files;
                }

If those lines are removed, it will work successfully.

The issue occurs when I set builder.setUserDirIsRoot( opts, true ). It works fine when it sets it to false.

Recommend to remove those lines




   

> VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked
> --------------------------------------------------------------------------------------------
>
>                 Key: VFS-436
>                 URL: https://issues.apache.org/jira/browse/VFS-436
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: java version "1.7.0_02"
> Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
> Linux version 2.6.18-238.el5 ([hidden email]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Thu Jan 13 15:51:15 EST 2011
>            Reporter: Jason
>            Priority: Blocker
>
> With the setting below, VFS doesn't pull the ftp directory successfully.
> Attempt to pull with
> ftp://root:password@ip:/softLinkTest/yes
> yes directory has the following info
> lrwxrwxrwx  1 root root   10 Sep 13 13:35 yes -> /root/tmp/
> I set builder.setUserDirIsRoot( opts, true ). It works fine when it sets it to false.
> When it runs through the getType() method after knowing it is a symbolic link, it tries to find the real directory's children but will return an empty array even though there's files listed under.
> I debugged through the source code, the reason is caused by the fix to 307 in FTPClientWrapper line 134
>         // VFS-307: no check if we can simply list the files, this might fail if there are spaces in the path
>   files = getFtpClient().listFiles(relPath);
>     if (FTPReply.isPositiveCompletion(getFtpClient().getReplyCode()))
>        {
>            return files;
>        }
> If those lines are removed, it will work successfully.
> Recommend to remove those lines

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (VFS-436) VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

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

Gary D. Gregory commented on VFS-436:
-------------------------------------

Do all the unit tests pass if you implement this change?
               

> VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked
> --------------------------------------------------------------------------------------------
>
>                 Key: VFS-436
>                 URL: https://issues.apache.org/jira/browse/VFS-436
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: java version "1.7.0_02"
> Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
> Linux version 2.6.18-238.el5 ([hidden email]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Thu Jan 13 15:51:15 EST 2011
>            Reporter: Jason
>            Priority: Blocker
>
> With the setting below, VFS doesn't pull the ftp directory successfully.
> Attempt to pull with
> ftp://root:password@ip:/softLinkTest/yes
> yes directory has the following info
> lrwxrwxrwx  1 root root   10 Sep 13 13:35 yes -> /root/tmp/
> I set builder.setUserDirIsRoot( opts, true ). It works fine when it sets it to false.
> When it runs through the getType() method after knowing it is a symbolic link, it tries to find the real directory's children but will return an empty array even though there's files listed under.
> I debugged through the source code, the reason is caused by the fix to 307 in FTPClientWrapper line 134
>         // VFS-307: no check if we can simply list the files, this might fail if there are spaces in the path
>   files = getFtpClient().listFiles(relPath);
>     if (FTPReply.isPositiveCompletion(getFtpClient().getReplyCode()))
>        {
>            return files;
>        }
> If those lines are removed, it will work successfully.
> Recommend to remove those lines

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (VFS-436) VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

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

Jason commented on VFS-436:
---------------------------

Yes, ran all the general test cases and the FtpProviderTestCase. Everything passed

               

> VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked
> --------------------------------------------------------------------------------------------
>
>                 Key: VFS-436
>                 URL: https://issues.apache.org/jira/browse/VFS-436
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: java version "1.7.0_02"
> Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
> Linux version 2.6.18-238.el5 ([hidden email]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Thu Jan 13 15:51:15 EST 2011
>            Reporter: Jason
>            Priority: Blocker
>
> With the setting below, VFS doesn't pull the ftp directory successfully.
> Attempt to pull with
> ftp://root:password@ip:/softLinkTest/yes
> yes directory has the following info
> lrwxrwxrwx  1 root root   10 Sep 13 13:35 yes -> /root/tmp/
> I set builder.setUserDirIsRoot( opts, true ). It works fine when it sets it to false.
> When it runs through the getType() method after knowing it is a symbolic link, it tries to find the real directory's children but will return an empty array even though there's files listed under.
> I debugged through the source code, the reason is caused by the fix to 307 in FTPClientWrapper line 134
>         // VFS-307: no check if we can simply list the files, this might fail if there are spaces in the path
>   files = getFtpClient().listFiles(relPath);
>     if (FTPReply.isPositiveCompletion(getFtpClient().getReplyCode()))
>        {
>            return files;
>        }
> If those lines are removed, it will work successfully.
> Recommend to remove those lines

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (VFS-436) [FTP] VFS doesn't pull correctly when pulling a directory that's symbolic linked

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/VFS-436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory updated VFS-436:
--------------------------------

    Summary: [FTP] VFS doesn't pull correctly when pulling a directory that's symbolic linked  (was: VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked)
   

> [FTP] VFS doesn't pull correctly when pulling a directory that's symbolic linked
> --------------------------------------------------------------------------------
>
>                 Key: VFS-436
>                 URL: https://issues.apache.org/jira/browse/VFS-436
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: java version "1.7.0_02"
> Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
> Linux version 2.6.18-238.el5 ([hidden email]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Thu Jan 13 15:51:15 EST 2011
>            Reporter: Jason
>            Priority: Blocker
>
> With the setting below, VFS doesn't pull the ftp directory successfully.
> Attempt to pull with
> ftp://root:password@ip:/softLinkTest/yes
> yes directory has the following info
> lrwxrwxrwx  1 root root   10 Sep 13 13:35 yes -> /root/tmp/
> I set builder.setUserDirIsRoot( opts, true ). It works fine when it sets it to false.
> When it runs through the getType() method after knowing it is a symbolic link, it tries to find the real directory's children but will return an empty array even though there's files listed under.
> I debugged through the source code, the reason is caused by the fix to 307 in FTPClientWrapper line 134
>         // VFS-307: no check if we can simply list the files, this might fail if there are spaces in the path
>   files = getFtpClient().listFiles(relPath);
>     if (FTPReply.isPositiveCompletion(getFtpClient().getReplyCode()))
>        {
>            return files;
>        }
> If those lines are removed, it will work successfully.
> Recommend to remove those lines

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (VFS-436) [FTP] VFS doesn't pull correctly when pulling a directory that's symbolic linked

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

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

Gary D. Gregory commented on VFS-436:
-------------------------------------

I think we need a different solution. This fix would undo VFS-307.
               

> [FTP] VFS doesn't pull correctly when pulling a directory that's symbolic linked
> --------------------------------------------------------------------------------
>
>                 Key: VFS-436
>                 URL: https://issues.apache.org/jira/browse/VFS-436
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: java version "1.7.0_02"
> Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
> Linux version 2.6.18-238.el5 ([hidden email]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Thu Jan 13 15:51:15 EST 2011
>            Reporter: Jason
>            Priority: Blocker
>
> With the setting below, VFS doesn't pull the ftp directory successfully.
> Attempt to pull with
> ftp://root:password@ip:/softLinkTest/yes
> yes directory has the following info
> lrwxrwxrwx  1 root root   10 Sep 13 13:35 yes -> /root/tmp/
> I set builder.setUserDirIsRoot( opts, true ). It works fine when it sets it to false.
> When it runs through the getType() method after knowing it is a symbolic link, it tries to find the real directory's children but will return an empty array even though there's files listed under.
> I debugged through the source code, the reason is caused by the fix to 307 in FTPClientWrapper line 134
>         // VFS-307: no check if we can simply list the files, this might fail if there are spaces in the path
>   files = getFtpClient().listFiles(relPath);
>     if (FTPReply.isPositiveCompletion(getFtpClient().getReplyCode()))
>        {
>            return files;
>        }
> If those lines are removed, it will work successfully.
> Recommend to remove those lines

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira