# How to  setup VsFTPD -  message  ftpd_banner  and  second message after login  password sucess..



## BadB (May 19, 2020)

Hello, please can help vsftpd on freebsd 12 ,
I installed vsftpd on freebsd, as I do to create a message right after it connects successfully. the banner and setup inside vsftpd.conf right, but it has a text message right after you are connected, you know where to create this text with this message, example from http://ftp.freebsd.org

```
Connected to http://ftp.geo.freebsd.org.
220 This is ftp0.nyi.freebsd.org – hosted at NYI.net. 
Name (ftp.freebsd.org:lika): anonymous
331 Please specify the password.
Password:
230-
230-This is ftp0.nyi.FreeBSD.org, graciously hosted by
230-New York Internet – NYI.net
230-
230-FreeBSD files can be found in the /pub/FreeBSD directory.
230-
230 Login successful.
```
first shows ftpd_banner and after that it shows another message text, where this text is created …
wait
thank you


----------



## SirDice (May 19, 2020)

```
dirmessage_enable
    If enabled, users of the FTP server can be shown messages when they first enter a new directory. By default, a directory is scanned for the file .message, but that may be overridden with the configuration setting message_file.

    Default: NO (but the sample config file enables it) 

message_file
    This option is the name of the file we look for when a new directory is entered. The contents are displayed to the remote user. This option is only relevant if the option dirmessage_enable is enabled.

    Default: .message
```


----------



## BadB (May 19, 2020)

SirDice said:


> ```
> dirmessage_enable
> If enabled, users of the FTP server can be shown messages when they first enter a new directory. By default, a directory is scanned for the file .message, but that may be overridden with the configuration setting message_file.
> 
> ...



SirDice this message I'm talking about and right after you enter your password and then this message is shown, example from ftp.freebsd.org
the first message shown is ftpd_banner right after another message is shown, you can check it by connecting to ftp.freebsd.org
wait
thank you


----------



## BadB (May 19, 2020)

BadB said:


> SirDice this message I'm talking about and right after you enter your password and then this message is shown, example from ftp.freebsd.org
> the first message shown is ftpd_banner right after another message is shown, you can check it by connecting to ftp.freebsd.org
> wait
> thank you



see the  message .
I am talking about this message after entering your login name.

```
331 Please specify the password.
Password:
230-
230-This is ftp0.nyi.FreeBSD.org, graciously hosted by
230-New York Internet - NYI.net
230-
230-FreeBSD files can be found in the /pub/FreeBSD directory.
230-
230 Login successful.
```


----------



## SirDice (May 19, 2020)

That's http://ftp.geo.freebsd.org/.message which is enabled with the options I showed above.


```
This is ftp0.bme.FreeBSD.org, graciously hosted by Bytemark.

FreeBSD files can be found in the /pub/FreeBSD directory.
```


----------



## BadB (May 19, 2020)

SirDice said:


> That's http://ftp.geo.freebsd.org/.message which is enabled with the options I showed above.
> 
> 
> ```
> ...



SirDice
already understand I created the message archive inside the _root site
and I did the test now it worked, it's working.
I thank you very much for your attention and patience.
thank you brother
BadB


----------



## SirDice (May 19, 2020)

You can create a different .message file in each directory. It will be automatically shown when a visitor changes to that directory.


----------



## BadB (May 19, 2020)

SirDice said:


> You can create a different .message file in each directory. It will be automatically shown when a visitor changes to that directory.


Okay, now how do I create this message for each directory?
have to create this .message file within each directory?
example of this ftp that you gave as an example.
ftp0.bme.FreeBSD.org
when I enter the directory it shows this message.

```
ftp> cd FreeBSD
250-ISO images of FreeBSD releases may be found in the releases/ISO-IMAGES
250-directory.  For independent files and tarballs, see individual
250-releases/${machine}/${machine_arch} directories.  For example,
250-releases/amd64/amd64 and releases/powerpc/powerpc64.
250 Directory successfully changed.
```
ok..


----------



## SirDice (May 19, 2020)

BadB said:


> have to create this .message file within each directory?


Yes.


----------



## BadB (May 19, 2020)

SirDice said:


> Yes.



okay already tested and it worked .message 

now you can explain to me, how to create TIMESTAMP and dir.sizes 

-rw-r--r--    1 ftp      ftp            35 May 19 13:15 TIMESTAMP
-rw-r--r--    1 ftp      ftp          2377 May 19 10:00 dir.sizes


----------



## SirDice (May 19, 2020)

Why do you think you need them?


----------



## BadB (May 19, 2020)

SirDice said:


> Why do you think you need them?



it shouldn't be too important right I just want to learn how it generates these files.


----------



## BadB (May 19, 2020)

I tried to generate the list of directories and sub directories with this command  dir list -cftuvSUX but did not create the dir.sizes file inside the directory / home / ftp
can you teach me the correct command line?
thank you


----------



## BadB (May 20, 2020)

SirDice said:


> Why do you think you need them?



good morming ...


----------



## BadB (May 20, 2020)

BadB said:


> good morming ...


Why do you think you need them?

And because I was wondering how to make dir.sizes like it was done on ftp0.bme.FreeBSD.org
I'm doing like this Rf> dir.sizes but it doesn't show the directory and subdirectories the same
1234567 / FreeBSD
123456678 / FreeBSD/release
right

thanks


----------

