FTP SERVER - Build UP Procedure

From: Antonio Prado (antonio.prado@tidalsoftware.com)
Date: Mon Mar 03 2003 - 10:33:43 EST


HI Managers,

sorry for the late response (Friday, as soon as I got my ftp server working
I started my weekend); to those who requested the procedure here it goes:

I just want to thank Robert Binkley for these notes: (copy and paste from
the original email).

//start howto document
----------------------------------------------------------------------------
        Instructions for configuring anonymous ftp on Digital UNIX
---------------------------------------------------------------------------

Step 1:

Use the "adduser" utility to add a new user called ftp. The new user,
ftp, should belong to the group ftp. When prompted for the group that
ftp should be in, answer ftp. Adduser will then prompt you if it
should create the new group, answer "yes". The new user, ftp, should
have a home directory of /var. The default shell is fine, you will be
modifying it. The password can be anything you like, since you will
be modifying it also.

After the adduser script has run, the newly created account has an
entry in the /etc/passwd file such as:

   ftp:mEFyvztssXGZk:269:79:anonymous ftp:/var/ftp:/bin/csh

The encoded passwd and uid will most likely be different at your site.

Next, use 'vipw' to edit /etc/passwd and modify the passwd entry. You
should delete the encrypted passwd and replace it with "*". Also,
replace the shell with /bin/false. The modified passwd entry will
look like:

   ftp:*:269:79:anonymous ftp:/var/ftp:/bin/false

Step 2:

Now that you have created the new ftp account, you will need to setup
some new directories in it.

# cd /var/ftp
# mkdir etc pub (if bin does not exist, create it also)
# cp /sbin/ls /var/ftp/bin
# cp /etc/passwd /var/ftp/etc
# cp /etc/group /var/ftp/etc
# cp /etc/svc.conf /var/ftp/etc
# chown -R ftp *
# mkdir /var/ftp/etc/sia
# cp /etc/sia/* /var/ftp/etc/sia
# chown ftp /var/ftp
# chmod -w /var/ftp
# chmod 111 /var/ftp/bin/ls
# chmod -w /var/ftp/bin
# chmod 555 /var/ftp/etc
# chmod 555 /var/ftp/pub

If adduser put default .login, .profile, and .cshrc files in the ftp
directory, delete them:

# rm .login .profile .cshrc

Step 3:

Next, you should edit /var/ftp/etc/passwd to remove any unnecessary
entries, as this file will be accessible by anonymous users. The
/var/ftp/etc/passwd file should have only root and ftp, with no
encrypted passwords. Here is a sample /var/ftp/etc/passwd file:

root:*:0:1:system PRIVILEGED account:/:/bin/false
ftp:*:269:79:anonymous ftp:/var/ftp:/bin/false

Also, edit /var/ftp/etc/group, leaving only the following:

system:*:0:root
ftp:*:30:ftp

Step 4:

This concludes the anonymous ftp setup. Any files that you wish the
public to read will go in /usr/ftp/pub. Anonymous users can log in
with a username of either 'anonymous' or 'ftp'.

    
Please contact the Customer Support Center if you have any questions on this
procedure or need further assistance in any way.

Regards,
Compaq UNIX Network Support Team

//end howto

Peace.

./antonio/.
Antonio Elder-Prado
Tidal Software, Inc.
Sr. Unix Systems Administrator
(650) 475 4628
antonio.prado@tidalsoft.com
Real Solutions. Real Impact. Real Time.



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:49:09 EDT