Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jul 2002 03:04:45 +0200
From:      Cyrille Lefevre <cyrille.lefevre@laposte.net>
To:        Phil Gates <p_gates@one.net>
Cc:        doc@FreeBSD.ORG
Subject:   Re: add user only can ftp
Message-ID:  <20020712010445.GO21234@gits.dyndns.org>
In-Reply-To: <002401c2292d$5894a940$0100000a@0016716867>
References:  <002401c2292d$5894a940$0100000a@0016716867>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 11, 2002 at 06:50:03PM -0400, Phil Gates wrote:
> Hi My name is Phil Gates.  I want add a user that only can ftp
> into a certain directory, ie they can not login into the machine.
> Can you tell me how to do this or what chapter to read to get
> this information. My email is p_gates@one.net

first of all, did you read the handbook ? I guess no.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/install-post.html#ANON-FTP2

also, questions like this are best in questions@freebsd.org

however, begin to read `man ftpd', then :

add the following line to your password file (using vipw) :

guestftp:*:1005:1005::0:0:guest FTP user:/home/guestftp:/sbin/nologin

this one to /etc/group :

guestftp::1005:

and this one to /etc/ftpchroot :

@guestftp

make sure `guestftp' doesn't exists in /etc/ftpusers and
eventually complete /etc/ftpwelcome w/ a message of your own.

of course, don't forget to create the user directory using :

mkdir -m 770 /home/guestftp; chown 1005:1005 /home/guestftp
cd /home/guestftp
mkdir .rhosts; touch .rhosts/disabled; chmod 0 .rhosts
mkdir .shosts; touch .shosts/disabled; chmod 0 .shosts
mkdir .ssh; touch .ssh/disabled; chmod 0 .ssh

to set up a true anonymous ftp, read the ftpd manual page or the
lukemftpd depending of your choice. also read the handbook
reference given above.

PS : your lines are too long. they MUST be 72 car. max. long.

Cyrille.
-- 
Cyrille Lefevre                 mailto:cyrille.lefevre@laposte.net

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020712010445.GO21234>