![]() |
||
|
||
![]() |
||
A : Why do someone want to create a script that can interact with RaidenFTPD ? That is because that with the newly introduced interface ask:// , you can tell RaidenFTPD "what to do" , for example , deny user from logging in , deny directory to be created , deny files to be uploaded . [SECTION 1 : Ask external programs for permission on doing something] 01. first
choose your favorite programming language , in this example we use PHP -
onFilePreUpload : executed before the user can gain the permission to
upload a file - onNewDir : executed before the user creates a directory - onFilePreDelete : executed before the user actually deletes a file - onFileDeleted: executed after the user actually deletes a file * using ask:// here will allow you to display messages to ftp client - onDelDir : executed before the user actually deletes a directory - onPreCwd : executed before the Change Working Directory event - onFileUploaded : executed after a file is uploaded , * the first line of your output file is ignored in this event - onZipUploaded : executed after a zip file is uploaded , * the first line of your output file is ignored in this event 05. in this
example , our php run time library path is c:\php-bin , and the script
name is 14. the
server will not clean up the Output directory for you , you need to clean
it up to download the additional ask/reply interface SDK , please click here [SECTION 2 : External programs tell the server to run some commands] 01. this
must be used with the procedures in section 1 to run a command under the current level (current account) , put this line in the output file (not in first line) #command<new line> i.e. #site undupe filename-a<new line> note that <new line> is the new line character \n , it should not be visible in a normal text editor note : <new line> is the new line character \n , it should not be visible in a normal text editor note : no nested event will be triggered , such as if you send a #CWD /xxx on onPreCwd event , the onPreCwd won't be triggered again If you wish to perform a command under root level , use the following format #sudo command i.e. #sudo site give john 1000 note : you can not use sudo to change user's level |
||
Copyright © RaidenFTPD TEAM , ALL RIGHTS RESERVED
REVISION 2.2 , 2002/06/06