[lug] LAMP FTP setup

George Sexton gsexton at mhsoftware.com
Thu Jun 7 09:55:58 MDT 2007


karl horlen wrote:
> george's solution seemed pretty simple and keeps the
> sandbox to an absolute minimum.  so do some of the ftp
> solutions.  they didn't seem that intensive.
>   
Here's the rest of my solution:

in /bin, create a file named "noftp" with this script:

#!/bin/sh
echo "502 Only SFTP on port 22 is allowed. SFTP Connections are required"

and in your xinetd.d directory put an ftpd file with this in it:

# default: on
# description: Tell users ftp is not supported

service ftp
{
    type        = UNLISTED
    port        = 21
    socket_type    = stream
    protocol    = tcp
    wait        = no
    disable        = no
    user            = nobody
    log_type        = SYSLOG ftp
    log_on_success  = HOST
    log_on_failure  = HOST
        server          = /bin/noftp
    cps             = 10 60
}                                                                               


-- 
George Sexton
MH Software, Inc.
Voice: +1 303 438 9585
URL:   http://www.mhsoftware.com/




More information about the LUG mailing list