Topic: File upload notification

I am currently running v1.15 on debian, and wondered if there was a feature that someone could help me with possibly.

I want to setup a cron job to scan /var/ftp/<folder name> looking for new files that have been uploaded.

If a new file has been uploaded, i would like it to email me with the folder name and name of the file, along with the date and time.

For example, it would show:  A new file <file name> has been uploaded in <folder name> on <date> at <server time>.

If someone could help me get this going, that would be great.

Thank you.

Re: File upload notification

cristobalaz wrote:

I am currently running v1.15 on debian, and wondered if there was a feature that someone could help me with possibly.

I want to setup a cron job to scan /var/ftp/<folder name> looking for new files that have been uploaded.

If a new file has been uploaded, i would like it to email me with the folder name and name of the file, along with the date and time.

For example, it would show:  A new file <file name> has been uploaded in <folder name> on <date> at <server time>.

If someone could help me get this going, that would be great.

Thank you.

Hi !

What you ask for is not implemented in MySecureShell but is a good idea !

Anyway, if you really want to accomplish this goal, look for file triggering systems like inotify :

http://en.wikipedia.org/wiki/Inotify

Good luck :-)

Re: File upload notification

Hi,

You can do a script with help of:

  • touch

  • find

Re: File upload notification

may be same issue maybe not.

prologue:
we use sftp as file transfer within our branches.
behind sftp working a lot of scripts - parse files etc.
scripts get file, decrypt and put in outgoing dir.

main problem: script don't know when file ready to use.
notify is best way, but not only one.

more simple solution it is
when client upload file MSS write data in temporary filename(prefix) and after success upload, sftp rename(owerwrite) it to real file.

many FTP servers have this feature. and i miss it in MySecureShell.

check this out:
http://www.proftpd.org/docs/directives/ … tores.html

and this one:
http://www.proftpd.org/docs/directives/ … tores.html

Re: File upload notification

Hi,

You're right, this features is planned later (I don't know when...) smile

At this time, you can use log of MySecureShell, at the of download or update, you can found:

End upload into file 'filename'

or

End download file 'filename' : 'percent done'%

6 (edited by xoco 2011-07-30 09:36:03)

Re: File upload notification

is it possible add more info for

[%s][%s]Interrupt upload into file '%s'
[%s][%s]Interrupt download file '%s' : %i

who break connection? this is network issue or user cancel ? any error code ?

for example:

2011-07-30 12:16:40 [5468][xxx][xxx.host]Start upload into file './some.file'
2011-07-30 12:16:41 [5468][xxx][xxx.host]Interrupt upload into file './some.file'
2011-07-30 12:16:41 [5468][xxx][xxx.host]Quit.

who is bad guy? SFTP server? SFTP client? ...
"Quit" - mean gracefull quit or disconnect by peer or time out disconnect?

Re: File upload notification

Hi,

Since the connection is under OpenSSH control, i don't have any informations when the connection is lost / ended / ...

When sftp client reach the timeout (configured in MySecureShell), you could see:

[%s][%s]Connection time out

"Quit" is the last things logged before exiting SFTP Session...