running script after sftp upload

running script after sftp upload

Hetz Ben Hamo hetzbh at gmail.com
Tue Jun 14 20:58:18 IDT 2011


What I meant was simple:

Lets say you have a sftp-server, which various people upload your files to
it.
After a file has been upload it, a script would automatically launch to
parse the file, change it's permissions, move it etc.

At the end the solution was to use incron.

Thanks,
Hetz

2011/6/14 Raz <raziebe at gmail.com>

> though I am not sure this is what hetz meant , i would have done it as
> follows:
> if some new file opened in /ftpdir
>   then run lsof -p <pidof ftpd> | grep filename
>   if true then ftp downloaded it
>
> what say you ?
>
> On Tue, Jun 14, 2011 at 11:13 AM, Elazar Leibovich <elazarl at gmail.com>wrote:
>
>>
>>  On Tue, Jun 14, 2011 at 10:49 AM, Raz <raziebe at gmail.com> wrote:
>>
>>>  so the file has an owner. the script should query the owner id. am i
>>> missing something here ?
>>>
>>
>> How would he know if the owner used ftp, or didn't use ftp?
>>
>>
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>


-- 

*חץ בן חמו
חץ-ביז
*השכרה ואירוח של שרתים פיזיים
מעוניין להשתמש בשרותים שחסומים לגולש הישראלי? Hulu? NetFlix? Pandora? Google
Voice? אם כן, כנס לכאן <http://vps.net.bz/?p=406>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20110614/fdf15e24/attachment-0001.html>


More information about the Linux-il mailing list