Click to See Complete Forum and Search --> : .message for proftpd


hercun
06-03-2004, 08:43 PM
Quick question, where is the .message file for proftpd?

Eugene

Loki3
06-03-2004, 11:00 PM
I think it's in your root ftp directory.

hercun
06-04-2004, 03:51 AM
You mean root by the user root dir? Because I checked in my user ~ and did not see anything but my files, when I typed ls -a I saw a screen and something else, but no .message file. I'm using proftpd 1.2.8.
Thank you for your prompt response

Eugene

bathory
06-04-2004, 05:19 AM
You need to create a welcome.msg file in the root directory of your ftp server (i.e. the directory where the user first sees when he connects to your server). Take a look at your proftpd.conf file for more info

hercun
06-04-2004, 06:27 PM
Could someone be kind enough to post an example .message file and also a welcome.msg file for me?
I've looked at the docs on proftpd.org and it did not have an example .message file or a welcome.msg.
Thank you

Eugene

hercun
06-07-2004, 06:39 AM
So I'm guessing no one has a .message file?
Also, absolutely no one has bothered to make proftpd display available space on the file system?
Here's the link to what I want done, but it does not explain at all what to do.
http://proftpd.linux.co.uk/localsite/Userguide/linked/config_ref_DisplayFirstChdir.html

Am I simply better off to use glftpd?

Eugene

bathory
06-07-2004, 08:14 AM
Well I use proftpd but I've never setup a welcome.msg or .message file. After visiting the URL you provided I made one as follows:

Hello %U from %R.
The time is %T and the available disk space is %F
You are user %N of %M connected to my ftp server

Of course you have to change your proftpd.conf (usually located at /usr/local/etc/proftpd.conf) to uncomment the "DisplayFirstChdir" directive and then restart proftpd.

hercun
06-07-2004, 01:48 PM
Unfortunately I have tried all of the suggestions. I figured that much from the URL that I gave you. I was a bit tired, it was 4am and I wasn't specific enough in my post. What I meant was that the documentation was not specific in the sense that it did not show an example, or where to create the .message file.
I figured that the file should reside in the home dir, but it did not specifically mention this in the documentation.
I have created a .message file in the user's home dir, I have also created a welcome.msg. DisplayFirstChdir was already uncommented and still nothing. I'm running in inetd so I needn't to restart.
Any ideas?

Eugene

bathory
06-08-2004, 03:11 AM
According to the documentation welcome.msg must reside on the root directory i.e. the directory defined by "DefaultRoot" and .message in the subdirectories.
Also you must uncomment "DisplayLogin" to show welcome.msg and "DisplayFirstChdir" to show .message. Pay attention to uncomment those directives (or add them if they don't exist) in the sections about normal users and/or anonymous users if you allow both normal and anonymous users to connect to your server.
And finally you must restart inetd for proftpd to read it's conf file.

hercun
06-09-2004, 08:34 PM
I have already tried all of that. DisplayLogin and DisplayFirstChdir were already uncommented with the default setup. As I have already previously mentioned.
DisplayFirstChdir was already uncommented and still nothing.


Here is my proftpd.conf file

# This is a basic ProFTPD configuration file.
# It establishes a single server and a single anonymous login.
# It assumes that you have a user/group "nobody" and "ftp"
# for normal/anonymous operation.

ServerName "VEAAH linux ftp server"
#ServerType standalone
ServerType inetd
DefaultServer on

# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30

# Set the user and group that the server normally runs at.
User nobody
Group nogroup

# This next option is required for NIS or NIS+ to work properly:
#PersistentPasswd off

SystemLog /var/log/proftpd.log
TransferLog /var/log/xferlog

# Normally, we want files to be overwriteable.
<Directory /*>
AllowOverwrite on
</Directory>


# A basic anonymous FTP server configuration.
# To enable this, remove the user ftp from /etc/ftpusers.
<Anonymous ~ftp>
RequireValidShell off
User ftp
Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp

# Limit the maximum number of anonymous logins
MaxClients 50

# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayFirstChdir .message

# Limit WRITE everywhere in the anonymous chroot
<Limit WRITE>
DenyAll
</Limit>

# An upload directory that allows storing files but not retrieving
# or creating directories.
# <Directory incoming/*>
# <Limit READ>
# DenyAll
# </Limit>
#
# <Limit STOR>
# AllowAll
# </Limit>
# </Directory>

</Anonymous>


#
#Jails everyone to their home dir
#
<VirtualHost file_slack.home.com>
DefaultRoot ~
</VirtualHost>


So if anyone could offer anymore suggestions, I would greatly appreciate it.
Thank you

Eugene

Loki3
06-09-2004, 11:01 PM
Okay, I see how you got things configured now.

It seems you're chrooting users in their home directory. So when bob logs in / for him is /home/bob. It's kind of ackward thing to explain. Here's another way to put it... from bob's perspective / is /home/bob.

So, in order for bob to see your cool .message (which I might just have to borrow! :cool:) your .message needs to be /home/bob.

Ya dig?

hercun
06-11-2004, 06:47 PM
Like I said before, I have tried that already. Numerous times, I've even restarted my linux box after creating .message file in the users home dir. If someone has this working could they please post the .message file, and their proftpd.conf if they do not mind.
Thank you once again

Eugene

Loki3
06-11-2004, 08:40 PM
Sorry, I don't use a .message file. Wish I could help.

hercun
06-14-2004, 01:37 AM
So absolutely no one in this forum had no use to display how much space is left on their file system with proftpd?
I give up.

Eugene

bathory
06-14-2004, 03:18 AM
As I told earlier I don't use welcome.msg or .message, but I set one up just to test if it works. It contains the following line:

The available disk space is: %F

I also attached my proftd.conf to help you find out what is wrong with your configuration.