You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Gerard Frederic <Fr...@atosorigin.com> on 2008/04/21 17:30:26 UTC

homedirectory on Unix and Windows

Hello Niklas

First, i saw your logo :) maybe that the presence of arrows (near the feather), reminding transfers, would be nice ?


Ok, I try to migrate java code + binaries from unix to windows, with embed ftpserver
Here a small issue from NativeFileSystemView.changeDirectory

All works fine in unix :

17:08:16,785 DEBUG executor.ExecutorFilter SocketAcceptorIoProcessor-0.0 - Launching thread for /10.24.230.26:38302
17:08:16,789 DEBUG ftpserver.IODataConnectionFactory pool-2-thread-1 - SSL data connection created on /10.24.230.26:9921
17:08:16,791 DEBUG executor.ExecutorFilter pool-2-thread-1 - Exiting since queue is empty for /10.24.230.26:38302
17:08:16,791 DEBUG executor.ExecutorFilter SocketAcceptorIoProcessor-0.0 - Launching thread for /10.24.230.26:38302
17:08:16,791 DEBUG executor.ExecutorFilter pool-2-thread-1 - Exiting since queue is empty for /10.24.230.26:38302
17:08:16,847 DEBUG executor.ExecutorFilter SocketAcceptorIoProcessor-0.0 - Launching thread for /10.24.230.26:38302
17:08:16,847 DEBUG ftplet.genlet pool-2-thread-1 - changing to directory /var/tmp/gf ...   <<<<  first, change to destination folder
17:08:16,847 DEBUG filesystem.NativeFileSystemView pool-2-thread-1 - directory is </var/tmp/gf>
17:08:16,924 DEBUG ftpserver.IODataConnectionFactory pool-2-thread-1 - Opening passive data connection
17:08:16,926 DEBUG ftpserver.IODataConnectionFactory pool-2-thread-1 - Passive data connection opened
17:08:17,070 INFO command.STOR pool-2-thread-1 - File upload : genuser - /var/tmp/gf/GEN-fileA
17:08:17,071 DEBUG ftplet.Genlet pool-2-thread-1 - onUploadEnd, curdir is /var/tmp/gf
17:08:17,071 DEBUG ftplet.Genlet pool-2-thread-1 - changing to directory /usr/local/gen/ ... <<<< recover current directory
17:08:17,071 DEBUG filesystem.NativeFileSystemView pool-2-thread-1 - directory is </usr/local/gen>
17:08:17,071 DEBUG executor.ExecutorFilter pool-2-thread-1 - Exiting since queue is empty for /10.24.230.26:38302
17:08:17,071 DEBUG executor.ExecutorFilter SocketAcceptorIoProcessor-0.0 - Launching thread for /10.24.230.26:38302
17:08:17,071 DEBUG executor.ExecutorFilter pool-2-thread-1 - Exiting since queue is empty for /10.24.230.26:38302
17:08:17,155 DEBUG executor.ExecutorFilter SocketAcceptorIoProcessor-0.0 - Launching thread for /10.24.230.26:38302
17:08:17,156 DEBUG executor.ExecutorFilter pool-2-thread-1 - Exiting since queue is empty for /10.24.230.26:38302
17:08:17,156 DEBUG executor.ExecutorFilter SocketAcceptorIoProcessor-0.0 - Launching thread for /10.24.230.26:38302
17:08:17,156 DEBUG executor.ExecutorFilter pool-2-thread-1 - Exiting since queue is empty for /10.24.230.26:38302
17:08:17,215 DEBUG e

But in windows (user homedirectory property is "/" too) :

15:18:06,324 DEBUG ftpserver.IODataConnectionFactory pool-2-thread-1 - SSL data connection created on /10.24.246.116:9921
15:18:06,324 DEBUG executor.ExecutorFilter pool-2-thread-1 - Exiting since queue is empty for /10.24.230.26:25025
15:18:06,324 DEBUG executor.ExecutorFilter SocketAcceptorIoProcessor-0.0 - Launching thread for /10.24.230.26:25025
15:18:06,324 DEBUG executor.ExecutorFilter pool-2-thread-1 - Exiting since queue is empty for /10.24.230.26:25025
15:18:06,387 DEBUG executor.ExecutorFilter SocketAcceptorIoProcessor-0.0 - Launching thread for /10.24.230.26:25025
15:18:06,387 DEBUG ftplet.Genlet pool-2-thread-1 - changing to directory d:/testGEN ...
15:18:06,387 DEBUG filesystem.NativeFileSystemView pool-2-thread-1 - directory is </d:/testGEN>
15:18:06,402 DEBUG ftpserver.IODataConnectionFactory pool-2-thread-1 - Opening passive data connection
15:18:06,402 DEBUG ftpserver.IODataConnectionFactory pool-2-thread-1 - Passive data connection opened
15:18:06,715 INFO command.STOR pool-2-thread-1 - File upload : genuser - /d:/testGEN/GEN-toto
15:18:06,715 DEBUG ftplet.Genlet pool-2-thread-1 - onUploadEnd, curdir is /d:/testGEN
15:18:06,715 DEBUG ftplet.Genlet pool-2-thread-1 - changing to directory D:/apps/Secure-GEN/ ...
15:18:06,715 DEBUG filesystem.NativeFileSystemView pool-2-thread-1 - directory is </d:/testGEN/D:/apps/Secure-GEN> <<<<<<<<  the problem
15:18:06,715 ERROR ftplet.Genlet pool-2-thread-1 - could'nt recover directory D:/apps/Secure-GEN/
15:18:06,731 DEBUG executor.ExecutorFilter pool-2-thread-1 - Exiting since queue is empty for /10.24.230.26:25025
15:18:06,731 DEBUG executor.ExecutorFilter SocketAcceptorIoProcessor-0.0 - Launching thread for /10.24.230.26:25025
15:18:06,731 INFO listener.FtpProtocolHandler pool-2-thread-1 - Close connection : 10.24.230.26 - genuser
15:18:06,731 DEBUG executor.ExecutorFilter pool-2-thread-1 - Exiting since queue is empty for /10.24.230.26:25025
15:18:06,918 DEBUG ftplet.Genlet Thread-1 - sending <

As if there were a concatenation with the CWD ?..

I would like to transfer file to any "device:/...." windows directory, so i wonder if i can set homedirectory to "/" in properties for genuser to feel more free about destinations devices ??

Thanks a lot
Frédéric





Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.


Re: homedirectory on Unix and Windows

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Tue, Apr 22, 2008 at 10:58 AM, Gerard Frederic
<Fr...@atosorigin.com> wrote:
>  - /aaa/destFolder/destFile ?

Or ~/aaa/destFolder/destFile should work.

>  And if someone wants to transfer a file to C:/bbb/destFolder/destFile, does the server prevent from doing that ?

Yes, most definitely. If not, please report a bug :-)

/niklas

RE: homedirectory on Unix and Windows

Posted by Gerard Frederic <Fr...@atosorigin.com>.
Hello

I had a look at the code, and I think I have to turn simpler my transfer rules concerning current directory server side...
I won't change directory, it's not necessary since the STOR command can accept full pathnames
So what are the naming conventions client side ? For example, if I set the homedirectory to D:/ server side,
what argument should be set for STOR command at the end to be the most standard possible ?
- D:/aaa/destFolder/destFile ?
- /aaa/destFolder/destFile ?
- aaa/destFolder/desFile ?
And if someone wants to transfer a file to C:/bbb/destFolder/destFile, does the server prevent from doing that ?

Thank you

-----Message d'origine-----
De : Niklas Gustavsson [mailto:niklas@protocol7.com]
Envoyé : lundi 21 avril 2008 21:22
À : Gerard Frederic
Cc : ftpserver-users@mina.apache.org
Objet : Re: homedirectory on Unix and Windows

Hi

On Mon, Apr 21, 2008 at 5:30 PM, Gerard Frederic
<Fr...@atosorigin.com> wrote:
>  First, i saw your logo :) maybe that the presence of arrows (near the feather), reminding transfers, would be nice ?

My limitations when it comes to graphics would show to much :-) I'll
be happy if someone took a stab at making a proposal.

>  15:18:06,715 DEBUG filesystem.NativeFileSystemView pool-2-thread-1 - directory is </d:/testGEN/D:/apps/Secure-GEN> <<<<<<<<  the problem

Could you please provide a test case for this? Either if you can make
it as a JUnit test like those in core
src/test/java/org/apache/ftpserver/clienttests or provide a
step-by-step description of how to replicate the issue? Feel free to
open a JIRA issue so that we track it.

>  I would like to transfer file to any "device:/...." windows directory, so i wonder if i can set homedirectory to "/" in properties for genuser to feel more free about destinations devices ??

No, I don't believe we support that.

/niklas



Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.


Re: homedirectory on Unix and Windows

Posted by Niklas Gustavsson <ni...@protocol7.com>.
Hi

On Mon, Apr 21, 2008 at 5:30 PM, Gerard Frederic
<Fr...@atosorigin.com> wrote:
>  First, i saw your logo :) maybe that the presence of arrows (near the feather), reminding transfers, would be nice ?

My limitations when it comes to graphics would show to much :-) I'll
be happy if someone took a stab at making a proposal.

>  15:18:06,715 DEBUG filesystem.NativeFileSystemView pool-2-thread-1 - directory is </d:/testGEN/D:/apps/Secure-GEN> <<<<<<<<  the problem

Could you please provide a test case for this? Either if you can make
it as a JUnit test like those in core
src/test/java/org/apache/ftpserver/clienttests or provide a
step-by-step description of how to replicate the issue? Feel free to
open a JIRA issue so that we track it.

>  I would like to transfer file to any "device:/...." windows directory, so i wonder if i can set homedirectory to "/" in properties for genuser to feel more free about destinations devices ??

No, I don't believe we support that.

/niklas