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 Raphael Bauduin <rb...@gmail.com> on 2009/03/11 09:36:24 UTC

onMkdirStart returning SKIP hangs client

Hi,

I want to prevent users to create directories, and I thought to return
FtpletResult.SKIP from onMkdirStart.
However, when the client issues a mkdir command, nothing happens after
the command has been sent: no error from the server, no prompt
available for another command, nothing.

What am I doing wrong?

Thanks!

Raphaël

-- 
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org

Re: onMkdirStart returning SKIP hangs client

Posted by Raphael Bauduin <rb...@gmail.com>.
On Wed, Mar 11, 2009 at 9:51 AM, Niklas Gustavsson <ni...@protocol7.com> wrote:
> On Wed, Mar 11, 2009 at 9:36 AM, Raphael Bauduin <rb...@gmail.com> wrote:
>> I want to prevent users to create directories, and I thought to return
>> FtpletResult.SKIP from onMkdirStart.
>> However, when the client issues a mkdir command, nothing happens after
>> the command has been sent: no error from the server, no prompt
>> available for another command, nothing.
>
> If you choose to return SKIP from your Ftplet, FtpServer will do
> nothing more with that request, meaning you're now responsible for
> returning the correct reply code to the client. For MKD, that's
> probably 257 if you created the directory that the client requested..

I see. As I want to prevent users to create directories I return 550
(code found on http://mina.apache.org/ftpserver/ftplet.html), and it
works as expected.

Thanks for your fast answer!

Raphaël


>
> /niklas
>



-- 
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org

Re: onMkdirStart returning SKIP hangs client

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Wed, Mar 11, 2009 at 9:36 AM, Raphael Bauduin <rb...@gmail.com> wrote:
> I want to prevent users to create directories, and I thought to return
> FtpletResult.SKIP from onMkdirStart.
> However, when the client issues a mkdir command, nothing happens after
> the command has been sent: no error from the server, no prompt
> available for another command, nothing.

If you choose to return SKIP from your Ftplet, FtpServer will do
nothing more with that request, meaning you're now responsible for
returning the correct reply code to the client. For MKD, that's
probably 257 if you created the directory that the client requested..

/niklas