Configuring An FTP Server II
Summary:- Allowing Anonymous Uploads
- Authenticated FTP
- More Security
Allowing Anonymous Uploads
To allow anonymous uploads, insert these lines into the 'Anonymous' section of your 'proftpd.conf' file:<Directory incoming> <Limit STOR CWD> ~AllowAll </Limit> <Limit READ RMD DELE MKD> ~DenyAll </Limit> </Directory>
chown ~ftp:ftp 1.1 $ The options in detail:
<Directory incoming> <Limit STOR CWD> ~AllowAll </Limit>
<Limit READ RMD DELE MKD SITE_CHMOD> ~DenyAll </Limit>
Authenticated FTP
Well, if you insist …Full Accounts
Every user on the system running the FTP server can access their home directory via FTP logging in with their user name and password. If you don't want that, i.e if you only want to allow anonymous access to the FTP server, add the directive<Limit LOGIN> ~DenyAll </Limit>
~DefaultRoot /var/ftpGuest Accounts
In order to create a password protected anonymous login, a so-called 'guest account', you have to create a user account on the server with a password (e.g. using useradd or 'Userdrake'). The directive you need is '~AnonRequirePassword on'. Let's assume you have created the user account 'ftplogin'. Your 'Anonymous' section would then look like this:<Anonymous ~ftp> User ftplogin Group ftp ~AnonRequirePassword on ~RequireValidShell off <Limit WRITE> ~DenyAll </Limit> </Anonymous>
More Security
Running any kind of server for untrusted clients poses a security threat. If you want to do this, you are advised to follow security advisories closely, e.g. by subscribing to lists like the famous Bugtraq. Mandrakesoft also offers two security mailing lists, security-announce and security-discuss. There are some more options for '/etc/proftpd.conf' which you should consider for the sake of security.Restricting Access
You can restrict access to certain IP ranges or hostnames with theLimit LOGIN
<Limit LOGIN> Order Allow,Deny Allow from 128.44.26.,myhost.mydomain.edu Deny from all </Limit>
Setting Filters
~AllowFilter
~DenyFilter
~AllowFilter
~DenyFilter
~AllowFilter "^{a-zA-Z0-9 ,}*$"~CommandBufferSize number
~PathAllowFilter
~PathDenyFilter
To reject all files with leading periods or dashes, use
~PathDenyFilter "(^|/){-.}"Limiting Resources
~ProFTPd lets you limit resources in various ways: you can limit the storage place, the number of connections, the amount of bytes transferred simultaneously and the resources for the server itself. To prevent people from filling up the file system '/var/ftp/incoming' is on, you can set a quota with:Quotas on<br> ~DefaultQuota bytes
~QuotaExempt UID
setquota
maxclients
~MaxClientsPerUser
~MaxInstances
~RateReadBPS
~RateReadFreeBytes
~RateReadHardBPS
~RateWriteBPS
~RateWriteFreeBytes
~RateWriteHardBPS
RLimitCPU
RLimitMemory
RLimitOpenFiles
Others
To make it harder for a potential attacker, you can hide the name of the software and its version either by giving~ServerIdent
off
Related Resources:
~ProFTPd Homepage~ProFTPd FAQ
~ProFTPd User Guide
Directive List
Example configurations and more in '/usr/share/ doc/proftpd-{...}' Revision / Modified: May 04, 2002
Author: Tom Berger Legal: This page is covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft.
Configuring An FTP Server II
Version 1.4 last modified by YianniKostaris651 on 17/08/2004 at 03:39
Version 1.4 last modified by YianniKostaris651 on 17/08/2004 at 03:39
Document data
- Lost account?
- Join the community, be part of the Club: it's free!
- Get the PWP Download Subscription!
Mandriva.com
Store
Club

