[comp.unix.admin] Setting up an anonymous FTP site..

giani@nexus.YorkU.CA (John Sfetsas) (01/17/91)

>I remember seeing some guidelines on setting up anon ftp servers
>some while ago - & can't find them just now ...
>
>So: I want to set up a *SECURE* anonymous ftp server on a Sun3/60 under
>SunOS4.1 - what do I need to do?  
>
>Or where should I look in order to RTFM ??
>
>Thanks
>Aidan

The procedure you have to follow in order to create an anonymous FTP site
is as follows :

1. Create an account called "ftp". Disable the account by placing an 
   asterisk (*) in the passwd field. Give the account a special home 
   directory, such as /usr/ftp or /usr/spool/ftp.

2. Make the home directory owned by "ftp" and unwritable by anyone:
     # chown ftp ~ftp
     # chown 555 ~ftp

3. Make the directory ~ftp/bin, owned by the super-user and unwritable by
   anyone. Place a copy of the ls program in this directory:
     # mkdir ~ftp/bin
     # chown root ~ftp/bin
     # chmod 555 ~ftp/bin
     # cp -p /bin/ls ~ftp/bin
     # chmod 111 ~ftp/bin/ls

4. Make the directory ~ftp/etc, owned by the super-user and unwritable by
   anyone. Place copies f the password and group files in this directory,
   with all the password fields changed to asterisks (*). You may wish to
   delete all but a few of the accounts and groups of these files; the
   only account that must be present is "ftp".
     # mkdir ~ftp/etc
     # chown root ~ftp/etc
     # chmod 555 ~ftp/etc
     # cp -p /etc/passwd /etc/group ~ftp/etc
     # chmod 444 ~ftp/etc/passwd ~ftp/etc/group

5. Make the directory ~ftp/pub, owned by "ftp" and world-writable. Users 
   may then place files that are to be accessible via anonymous FTP in this
   directory:
     # mkdir ~ftp/pub
     # chown ftp ~ftp/pub
     # chmod 777 ~ftp/pub

rickert@mp.cs.niu.edu (Neil Rickert) (01/17/91)

In article <20527@yunexus.YorkU.CA> giani@nexus.YorkU.CA (John Sfetsas) writes:
>
>The procedure you have to follow in order to create an anonymous FTP site
>is as follows :
>(.. detailed description ..)

 In systems suchs Suns (as in the original request), a further step is
necessary.  If your system uses shared libraries, a copy of the shared
link library also must be provided under the directory ~ftp.  Either that,
or a version of 'ls' is needed which doesn't use the shared library.

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940

dce@smsc.sony.com (David Elliott) (01/19/91)

In article <20527@yunexus.YorkU.CA> giani@nexus.YorkU.CA (John Sfetsas) writes:
>The procedure you have to follow in order to create an anonymous FTP site
>is as follows :

While the explanation that followed was quite reasonable and correct
for many machines, it's probably better to tell people to refer to
their ftpd manual page.  On SVR4, for example, you also have to
create ~ftp/dev and put the appropriate entries in it (the commands
to do so are given in the manual page), and I suspect that there
are other systems with slight differences as well.