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 Milos Novakovic <mi...@gmail.com> on 2012/12/06 18:33:39 UTC

problem with symlink

Does anyone know, how symlinks should be disabled?

Thanks.

-- 
Best regards,
Mr Milos M. Novakovic, dip. ing. el.

Re: FTP server dies every few hours

Posted by David Latorre <dv...@gmail.com>.
Hello Jerry,

 We have several instances of FTPServer in Linux and Win Server 2003 and
never suffered such a problem (they have been running for months now). Can
you provide us with the following information?

1) Apache FTPServer, Apache MINA and JRE/JDK versions.

2)  Are you using any custom code (e.g., Ftplets, commands, filesystem )  ?


I cannot recall any similiar issue so my initial thought was that your
problem is due to 2) - but I haven't been able to follow the mailing list
lately so I might be utterly wrong.




2012/12/7 Jerry M <te...@malcolms.com>

> I've been using the FTPServer (on Win Server 2008) since around June of
> this year.  I don't need ftp around the clock.  So this problem hasn't been
> critical.  But it has become very annoying.  I have it configured to run as
> a Windows service.  I'll start the FTP service.  Do ftp tasks on and off
> for a few hours.  When I come back hours later or the next day and try to
> FTP, I get a "server closed connection unexpectedly" or something like that
> when I try to send or receive.  I then have to log on to the server and
> bounce the ftp service.  Everything is good to go again, for a few hours.
>  Then it's dead again the next time I need it.
>
> Again, this is as consistent as clockwork.  I've never had it stay up 24
> hours.  I looked at the FTP logs and see nothing irregular logged.
>
> First question... does this sound familiar to anyone?  Second question...
> if no one has heard of this behavior until now, what kind of debug can I do
> to try to figure out what is happening? (I've got an extensive coding and
> debug background.  So I can go under the hood if necessary).
>
> I like the server.  I would just like for it to stay alive more than a few
> hours.
>
> BTW... not seeing anything like this on any of my other servers (apache,
> tomcat, james) that are running in the same box.
>
> Thanks.
>
> Jerry
>

Re: FTP server dies every few hours

Posted by Sai Pullabhotla <sa...@jmethods.com>.
Which FTP client are you using? Are you leaving the client open/idle for
several hours and then getting the "server closed connection" error when
you attempt to transfer the files?


On Thu, Dec 6, 2012 at 10:43 PM, Jerry M <te...@malcolms.com> wrote:

> I've been using the FTPServer (on Win Server 2008) since around June of
> this year.  I don't need ftp around the clock.  So this problem hasn't been
> critical.  But it has become very annoying.  I have it configured to run as
> a Windows service.  I'll start the FTP service.  Do ftp tasks on and off
> for a few hours.  When I come back hours later or the next day and try to
> FTP, I get a "server closed connection unexpectedly" or something like that
> when I try to send or receive.  I then have to log on to the server and
> bounce the ftp service.  Everything is good to go again, for a few hours.
>  Then it's dead again the next time I need it.
>
> Again, this is as consistent as clockwork.  I've never had it stay up 24
> hours.  I looked at the FTP logs and see nothing irregular logged.
>
> First question... does this sound familiar to anyone?  Second question...
> if no one has heard of this behavior until now, what kind of debug can I do
> to try to figure out what is happening? (I've got an extensive coding and
> debug background.  So I can go under the hood if necessary).
>
> I like the server.  I would just like for it to stay alive more than a few
> hours.
>
> BTW... not seeing anything like this on any of my other servers (apache,
> tomcat, james) that are running in the same box.
>
> Thanks.
>
> Jerry
>

Re: FTP server dies every few hours

Posted by Jerry M <te...@malcolms.com>.
I've been using the FTPServer (on Win Server 2008) since around June of 
this year.  I don't need ftp around the clock.  So this problem hasn't 
been critical.  But it has become very annoying.  I have it configured 
to run as a Windows service.  I'll start the FTP service.  Do ftp tasks 
on and off for a few hours.  When I come back hours later or the next 
day and try to FTP, I get a "server closed connection unexpectedly" or 
something like that when I try to send or receive.  I then have to log 
on to the server and bounce the ftp service.  Everything is good to go 
again, for a few hours.  Then it's dead again the next time I need it.

Again, this is as consistent as clockwork.  I've never had it stay up 24 
hours.  I looked at the FTP logs and see nothing irregular logged.

First question... does this sound familiar to anyone?  Second 
question... if no one has heard of this behavior until now, what kind of 
debug can I do to try to figure out what is happening? (I've got an 
extensive coding and debug background.  So I can go under the hood if 
necessary).

I like the server.  I would just like for it to stay alive more than a 
few hours.

BTW... not seeing anything like this on any of my other servers (apache, 
tomcat, james) that are running in the same box.

Thanks.

Jerry

Re: problem with symlink

Posted by Sai Pullabhotla <sa...@jmethods.com>.
The listFiles is actually in FTPFile interface which is implemented by
NativeFTPFile. Sorry about the confusion.

Sai.


On Thu, Dec 6, 2012 at 4:37 PM, Milos Novakovic <mi...@gmail.com> wrote:

> Thanks, I am checking this.
>
> Is posibly that in NativeFileSystemView is no method listFiles ?
>
> I see only getFiles...
>
> On Thu, Dec 6, 2012 at 9:46 PM, Sai Pullabhotla <
> sai.pullabhotla@jmethods.com> wrote:
>
> > NativeFileSystem
>
>
>
>
> --
> Best regards,
> Mr Milos M. Novakovic, dip. ing. el.
>

Re: problem with symlink

Posted by Milos Novakovic <mi...@gmail.com>.
Thanks, I am checking this.

Is posibly that in NativeFileSystemView is no method listFiles ?

I see only getFiles...

On Thu, Dec 6, 2012 at 9:46 PM, Sai Pullabhotla <
sai.pullabhotla@jmethods.com> wrote:

> NativeFileSystem




-- 
Best regards,
Mr Milos M. Novakovic, dip. ing. el.

Re: problem with symlink

Posted by Sai Pullabhotla <sa...@jmethods.com>.
Your best bet is to implement the FileSystemView or extend the
NativeFileSystem and override the listFiles method to omit symlinks. For
Java 1.6 and earlier versions, below is a link to figure out if a file is a
symlink. Not sure if it works on all OSes, but should work on *NIX systems.
If using Java 1.7, I believe there are APIs to do this.

http://stackoverflow.com/questions/813710/java-1-6-determine-symbolic-links

If you do not want to write your own implementation, then you can provide a
patch with a configurable parameter so the NativeFileSystem would
include/exclude symlinks.

Hope this helps.

Sai.


On Thu, Dec 6, 2012 at 11:33 AM, Milos Novakovic <mi...@gmail.com> wrote:

> Does anyone know, how symlinks should be disabled?
>
> Thanks.
>
> --
> Best regards,
> Mr Milos M. Novakovic, dip. ing. el.
>