Setting an ENV Variable

2017-04-05 Thread Faseela Mohamed
Hi .. I am using FTP Server .. Is there a way to set an ENV variable
through Apache FTP Server configuration.


Thanks,
Faseela


Re: Restricting hidden files to upload

2017-02-20 Thread Faseela Mohamed
Thanks for the inputs ... To avoid even go to onUploadStart() , I used the
below method. ..


 else if ("STOR".equals(command)) {
if (defaultLogin.equals(session.getUser()) ) return
FtpletResult.DISCONNECT;



*if (reqLine.contains("STOR .")){System.out.println("User
upload HIDDEN FILE   "); return FtpletResult.SKIP;
}*
return onUploadStart(session, request);
}

On Mon, Feb 20, 2017 at 4:20 AM, Gary Bell 
wrote:

> Sorry, didn't read the OP properly. I would agree with John. I do
> something similar in my code.
>


Re: Custom welcome message

2017-02-17 Thread Faseela Mohamed
Log Level 1 - Warning also , the custom message shows up with fewer
messages. Thanks alot for all your input Gary. It really helped.

On Fri, Feb 17, 2017 at 10:39 AM, Faseela Mohamed <faseela.moha...@gmail.com
> wrote:

> Thanks again Gary. It worked . It showed my message , but it is showing
> all the info ... that is too much info for the user :( ..It lists all the
> commands and trace and response.
>
>
> Response: *220 Custom welcome message by Faseela.*
> Command:AUTH TLS
> Response: 234 Command AUTH okay; starting TLS connection.
> Status:  Initializing TLS...
> Trace:   TLS Handshake successful
> Trace:   Protocol: TLS1.2, Key exchange: ECDHE-RSA, Cipher:
> AES-128-GCM, MAC: AEAD
> Status:  Verifying certificate...
> Status:  TLS connection established.
> Command:USER x...@123.com
> Response: 331 User name okay, need password for x...@123.com
> Command:PASS ***
> Response: 230 User logged in, proceed.
> Command:OPTS UTF8 ON
> Response: 200 Command OPTS okay.
> Command:PBSZ 0
> Response: 200 Command PBSZ okay.
> Command:PROT P
> Response: 200 Command PROT okay.
> Command:OPTS MLST size;modify;type;
> Response: 200 Command OPTS okay.
>
>
> On Fri, Feb 17, 2017 at 1:48 AM, Gary Bell <gary.b...@aero.bombardier.com>
> wrote:
>
>> Hi Faseela, it looks like Filezilla is hiding the response string
>> returned from ftpserver unless an error occurs (in which case it shows the
>> full log in the log window). On filezilla 3.14.1, I got it to show the
>> custom response message all the time by setting the debug level in the
>> preferences to "2 - Info". Not sure if this is an option for you?
>>
>>
>>
>


Re: Custom welcome message

2017-02-17 Thread Faseela Mohamed
Thanks again Gary. It worked . It showed my message , but it is showing all
the info ... that is too much info for the user :( ..It lists all the
commands and trace and response.


Response: *220 Custom welcome message by Faseela.*
Command:AUTH TLS
Response: 234 Command AUTH okay; starting TLS connection.
Status:  Initializing TLS...
Trace:   TLS Handshake successful
Trace:   Protocol: TLS1.2, Key exchange: ECDHE-RSA, Cipher:
AES-128-GCM, MAC: AEAD
Status:  Verifying certificate...
Status:  TLS connection established.
Command:USER x...@123.com
Response: 331 User name okay, need password for x...@123.com
Command:PASS ***
Response: 230 User logged in, proceed.
Command:OPTS UTF8 ON
Response: 200 Command OPTS okay.
Command:PBSZ 0
Response: 200 Command PBSZ okay.
Command:PROT P
Response: 200 Command PROT okay.
Command:OPTS MLST size;modify;type;
Response: 200 Command OPTS okay.


On Fri, Feb 17, 2017 at 1:48 AM, Gary Bell 
wrote:

> Hi Faseela, it looks like Filezilla is hiding the response string returned
> from ftpserver unless an error occurs (in which case it shows the full log
> in the log window). On filezilla 3.14.1, I got it to show the custom
> response message all the time by setting the debug level in the preferences
> to "2 - Info". Not sure if this is an option for you?
>
>
>


Re: Custom welcome message

2017-02-16 Thread Faseela Mohamed
Thanks Gary for the response. I did the same (steps 1 t0 6) , but I
mentioned the whole path, 
wrote:

> Hi, I just tried that out and it worked form me on FtpServer-1.1.0. This
> is what I did:
>
> 0. Downloaded the latest FtpServer zip file and extracted it.
> 1. Created a new folder called \res\messages
> 2. Added a new file called FtpStatus.gen
> 3. Added my custom message for login like so:
>
> 220=JESTER ready for connection. WARNING! All activity on this site is
> monitored and tracked. Authorised personnel only.
>
> 4. Edited the res\conf\ftpd-typical.xml file to add the following element
> under the  tag:
>
> 
>
> 5. Started ftpserver under a cmd shell, passing in the config file to use:
>
> Bin\ftpd.bat \res\conf\ftpd-typical.xml
>
> 6. Connected to it using ftp client built into Windows 7 via the command
> prompt on port 2121
>
> Observed that the 220 greeting showed my new message.
>
> In production, I actually set the custome messages using a message factory
> when I am setting up the ftp server instance.
>
>  -- cut 
>
> FtpServerFactory factory = new FtpServerFactory();
>
> //Customised server messages (optional)
> String customMessageFile = config.getPropertyAsString("
> server.customMessages");
> if ( customMessageFile != null) {
> LOG.debug("Custom message resource specified: " +
> customMessageFile);
> File f = new File(customMessageFile);
> if (f.exists()) {
> LOG.debug("Message file exists,
> configuring.");
> MessageResourceFactory messageFactory =
> new MessageResourceFactory();
> messageFactory.
> setCustomMessageDirectory(f);
> factory.setMessageResource(messageFactory.
> createMessageResource());
> } else {
> LOG.error("Custom message bundle
> \""+customMessageFile + "\" specified, but does not exist. Not loaded.");
> }
> }
>  cut ---
>
>
>
>
> Best Regards,
> Gary.
>


Custom welcome message

2017-02-15 Thread Faseela Mohamed
Hi,

I am using Apache FTP server in standalone mode. I would like to give a
custome welcome message. I created FtpStatus.gen in one directory and gave
taht in messages tag.


Still it in not showing. Is tehre anything i missed ?

I also tried  session.write(new DefaultFtpReply(
FtpReply.REPLY_220_SERVICE_READY ,"   Welcome to the My FTP ");

on onConnect method of FTP let. It shows teh message and getting "GnuTLS
error -15: An unexpected TLS packet was received."

Please help.

Thanks,