ok, first, we have a bug in the proftpd package, I am the culprit of that one. I packaged new openssl without noticing that the new packages would break proftpd. I need to recompile proftpd against the new openssl packages. You can install this package from slackware so you dont have to wait for me:
http://slackware.osuosl.org/slackware-12.1/patches/packages/proftpd-1.3.1-i486-2_slack12.1.tgzOpen a terminal and cd into a temporary location of your choice, then:
wget http://slackware.osuosl.org/slackware-12.1/patches/packages/proftpd-1.3.1-i486-2_slack12.1.tgz
# become root to upgrade the package
su
# upgrade the package instead install so you dont get two versions installed at the same time
upgradepkg proftpd-1.3.1-i486-2_slack12.1.tgz
Now we are ready to start playing with proftpd. There is two ways or modes for running proftpd. The first one is the StandAlone mode. proftpd will run as a daemon in the background listening from connections. The second one is the inetd mode. This one uses the inetd service for starting the proftpd process. Instead of having the daemon running all the time, the process will start only when a client asks for it at the port 21 or another port of your choice. This one has the obvious advantage of not needing the ftpd daemon running all the time. We have another daemon (yeah I know, funny) that can start or stop other daemons for us.
The StandAlone mode.
This one is more easy, you dont need to configure inetd. Open a terminal and with the text editor of your choice open /etc/proftpd.conf, for example:
vim /etc/proftpd
Then comment the inetd line, and uncomment the StandAlone one, so they look like this:
ServerType standalone
#ServerType inetd
Now we are ready for our first test, in the terminal as root run:
proftpd -n
The -n flag will prevent proftpd from detaching from the terminal to the background. This is cool for testing as you can see the logs in that terminal window and you can stop the daemon easily by hiting control+c at any time. So, with your favorite ftp client try to connect to your own box, I like lftp myself.
In the proftpd terminal I can see:
root:# proftpd -n
- warning: the DisplayFirstChdir directive is deprecated and will be removed in a future release. Please use the DisplayChdir directive.
vector1.baires - ProFTPD 1.3.1 (stable) (built Tue Jul 29 13:25:16 CDT 2008) standalone mode STARTUP
vector1.baires (vector1.baires[192.168.0.2]) - FTP session opened.
vector1.baires (vector1.baires[192.168.0.2]) - USER rbistolfi: Login successful.
vector1.baires (vector1.baires[192.168.0.2]) - FTP session closed.
And using lftp, I see in another terminal:
rbistolfi:$ lftp vector1.baires -u rbistolfi
Password:
lftp rbistolfi@vector1.baires:~> ls docs
drwxr----- 2 rbistolfi rbistolfi 4912 Sep 19 2008 Programming_in_Lua
That is the directory listing of my ~/docs directory (yeah, I lost my docs in my last migration, I forgot to backup them, I will have to use my google foo again to recover them). A note: at this point, only users with an account in your box can access the server, so you need to use your username and password and the same permissions policy of the regular filesystem is valid over the ftp protocol.
Allowing anonymous login.
Allowing anonymous login is easy. In the /etc/ftpusers files there is a list of users, those are the users that are NOT ALLOWED to use the ftp system. Remove the ftp user from that list to allow anonymous login. This will take the users to the /home/ftp folder after connecting, in that directory you can place files to share.
At this point you should read something about how to secure an ftp server, stay tunned with security updates and advisories on proftpd etc etc. Avoiding anonymous login is maybe a good idea. One way of doing that would be creating a user exclusively for ftp. You can add new users using vasm. You could create one user called, for example, ftp-user. Use its home directory as shared folder, give the user and the password to your trusted friends.
As time permits, I will add some information about the inetd mode of proftpd, the sftp feature of sshd, and maybe some about httpd. We could put together a nice HowTo about file sharing in VL.
HTH