Is there a way I can review the FTP log on the Iseries. I am looking for a way to audit the users that ftp to the ISeries IFS directory?
Announcement
Collapse
No announcement yet.
FTP log
Collapse
X
-
Re: FTP log
Where is the log located and how did you FTP the file. We generate a new member on the FTPLOGIN - has the FTP commands
and FTPLOG - has the log entries.
Code:/* The InPut Override has the log in information * OvrDbf File(INPUT) ToFile(FtpLogIn) /* The OutPut Override logs the FTP session information * OvrDbf File(OUTPUT) ToFile(FTPLOG) Mbr(&Member) /* The OutPut Override has the log information * OvrDbf File(QCLSRC) ToFile(FTPLOG) LvlChk(*NO) /* Start the FTP with The Server Name retreived from F5547FTPC */ StrTCPFTP Rmtsys(&SERVNAME) DltOvr File(*ALL)Never trust a dog to watch your food.
Comment
-
Re: FTP log
Thanks for the information but I need some clarification. If I have a user that uses ftp commands to put a file into a IFS folder. Do I need to get that user profile and feed that into the program?
0003.00 PGM
0003.01 DCL VAR(&MEMBER) TYPE(*CHAR) LEN(40) +
0003.02 VALUE('FTPUSR')
0003.03 /* THE INPUT OVERRIDE HAS THE LOG IN INFORMATION */
0003.04 OVRDBF FILE(INPUT) TOFILE(FTPLOGIN)
0003.05
0003.06 /* THE OUTPUT OVERRIDE LOGS THE FTP SESSION INFORMATION */
0003.07 OVRDBF FILE(OUTPUT) TOFILE(FTPLOG) MBR(&MEMBER)
0003.08
0003.09 /* THE OUTPUT OVERRIDE HAS THE LOG INFORMATION */
0003.10 OVRDBF FILE(QCLSRC) TOFILE(FTPLOG) LVLCHK(*NO)
0003.11
0003.12 /* START THE FTP WITH THE SERVER NAME RETREIVED FROM ISERIES */
0003.13 STRTCPFTP RMTSYS('AS400')
0003.16 DLTOVR FILE(*ALL)
0013.13 END: ENDPGM
When I run the program I get an error message on the FTPLOGIN line. Can you clarify how I review the ftp log for this user?
Thanks,
DAC
Comment
-
Re: FTP log
Create the FTPLOGIN in QTEMP or have a seperate library/file,member combination.
In the FTPLOGIN in write the ftp script that you want run e.g. user password, change directories put or get, etc.
Code:* ------------------------------------------------------------------------ * Create a new FTPLOGIN file in Qtemp C/exec sql C+ Create Table QTemp/FTPLogIn C+ (CmdLine CHAR (254) Not Null with Default) C/end-exec * ------------------------------------------------------------------------ * Insert the login for user and password into script file. C Eval CmdLineW = EcUser + ' ' + EcPsWd C/exec sql C+ Insert Into QTemp/FTPLogIn C+ (CMDLINE) Values(:CmdLineW) C/end-exec * ------------------------------------------------------------------------ * Change directory to remote mailbox for the profile being processed C Eval CmdLineW = 'cd ' + %TrimR(EcPth) . . . C Eval CmdLineW = 'quit ' C/exec sql C+ Insert Into Qtemp/FTPLogIn C+ (CMDLINE) Values(:CmdLineW) C/end-execNever trust a dog to watch your food.
Comment



Comment