SunSolve Internal

Infodoc ID   Synopsis   Date
11991   FTP PSD/FAQ   13 Oct 1999

Description Top

SunService Tip Sheet for FTP

Including FTP, Anonymous FTP, TFTP

Revision 1.6
Date Top
July 10, 1996

Mail to: brian.hackley@east.sun.com

Table of Contents

1.0: About FTP
2.0: Debugging FTP
  2.1: ftpd -d
  2.2: chroot
  2.3: Other Network Problems
3.0: Common How Tos
  3.1: How to Set Up Anonymous FTP on a SunOS Machine?
  3.2: How to Set Up Anonymous FTP on a Solaris Machine?
  3.3: How To Start Logging with FTP?
  3.4: How to Set Up TFTP?
  3.5: How do I Set Up or Enable "automatic login" With ftp?
  3.6: How do I Set Up FTP Anonymous ftp Sub-logins?
4.0: Some Frequently Asked Questions
  4.1: Miscellaneous Questions
  4.2: Common FTP Client Problems
  4.3: Common FTP Server Problems
  4.4: Anonymous FTP Problems
  4.5: TFTP Questions
5.0: Patches
  5.1: FTP Patches for SunOS
  5.2: FTP Patches for Solaris
  5.3: TFTP Patches for Solaris
6.0: Known Bugs & RFEs
  6.1: RFEs
7.0: References
  7.1: Important Man Pages
  7.2: Sunsolve Documents
  7.3: Sun Educational Services
  7.4: Solaris Documentation
  7.5: Third Party Documentation
  7.6: RFCs
8.0: Supportability
9.0: Additional Support

 1.0: About FTP

This Tip Sheet documents a wide variety of information concerning FTP
as implemented in the SunOS and Solaris operating systems. It is
intended as a guide to the most common setup questions and problems
with FTP. A few references give some additional information on FTP
these are noted in Section 7.0.

The following terms are important for a clear understanding of FTP:

FTP, or File Transfer Protocol, is a standard way by which files can
be sent from one machine to another. It consists of a client program,
FTP, which makes File Requests, and a server program, FTPD, which
honors these requests.

ANONYMOUS FTP is used when a system administrator wants to make files
available to the net as a whole. If Anonymous FTP is enabled on a
machine, anyone can ftp to that machine using the 'ftp' or 'anonymous'
account.

TFTP, or the Trivial File Transfer Protocol, is closely related to FTP.
It is an extremely simplistic version of FTP which is often used for
booting diskless clients and X terminals. Care should be taken with
TFTP because it has only minimal concerns with security.

2.0 Debugging FTP

 2.0: Debugging FTP

FTP very rarely has problems beyond the basic issues listed in this
document. The following tools might be somewhat useful in examining any
further problems, but will really only be necessary in the rarest of
circumstances.

 2.1: ftpd -d

The debugging level of ftpd can be increased by starting it with the
-d option. This can be done by modifying the inetd.conf, to add this
option, as follows:

  ftp     stream  tcp     nowait  root    /usr/sbin/in.ftpd       in.ftpd -d

(This is the line from the Solaris inetd.conf  SunOS is very
similar, though the location of in.ftpd is different.)

You will also need to modify syslog.conf by adding the following line:

  daemon.debug                   /var/adm/ftp-debug.log

Afterwards, you must restart both inetd and the syslogd:

  %%%% kill -HUP inetd-pid
  %%%% kill -HUP syslog-pid

This will show you all the return codes and low-level FTP commands in
the file /var/adm/ftp-debug.log, as the session proceeds:

  Oct  4 10:22:21 psi ftpd[8080]: psi FTP server (UNIX(r) System V Release 4.0)
  ready.
  Oct  4 10:22:23 psi ftpd[8080]: FTPD: command: USER appel
  Oct  4 10:22:23 psi ftpd[8080]: <--- 530
  Oct  4 10:22:23 psi ftpd[8080]: User appel access denied.
  Oct  4 10:22:24 psi ftpd[8080]: FTPD: command: QUIT
  Oct  4 10:22:24 psi ftpd[8080]: <--- 221
  Oct  4 10:22:24 psi ftpd[8080]: Goodbye.

This might be helpful just to determine that ftp commands are getting
to ftpd.

 2.2: chroot

If you are continuing to have problems setting up an anonymous ftp
directory, especially if you are having problems with ls not working
and the suggestions in Section 4.3 do not help, you can get some
additional information from the chroot command, run as follows:

  # chroot /usr/ftp /bin/ls

(/usr/ftp should be replaced with whatever your anonymous ftp
directory is)

In case of errors, using this command will give you a much more
precise idea of what has been forgotten:

  # chroot /usr/ftp /bin/ls
  ls: Cannot find /usr/lib/ld.so.1

 2.3: Other Network Problems

Unless you are getting specific errors from ftpd, it is likely that
most other problems accessing FTP are related to network problems as a
whole. Most specifically, in cases of machine inaccessibility, you
should check your interfaces and routing, while in cases of ftp
returning 'host unknown' you should examine your naming services (DNS,
NIS, NIS+). SunService has other documents available for all of these
products.

If you are having problems with FTP being slow or sluggish, it is
probable that you have an overall network performance problem. This is
beyond the scope of the help that SunService can provide. Consult
Sections 8.0 and 9.0 for other alternatives that you have in this
case.

3.0 Common How Tos

 3.1: How to Set Up Anonymous FTP on a SunOS Machine?

This document describe how to set up an anonymous ftp account on a
Sun 4.1.X system.  Other systems might vary slightly from these
instructions.  The ftpd man page instructions are not clear, and
other books, such as the "Unix System Administrator's Handbook", give
generic instructions and are not specific to Sun.

These instructions do NOT apply to Solaris 2.X.

1.  Login or su to root.

2.  Create an ftp login in /etc/passwd. Add the following line to
    /etc/passwd:

    ftp:*:11:20::/home/hostname/ftp:

    Note:  The uid number can be any available non-reserved number
    number  the home directory is system administrator selectable.
    Use this directory in following steps.
    The shell entry is intentionally left out.

3.  Create ftp directories and set their permissions:

  mkdir /home/hostname/ftp
  cd ~ftp
  mkdir bin dev etc pub usr
  mkdir usr/lib
  chown ftp .
  chgrp other .
  chmod 555 .
  chown root ./bin
  chgrp wheel ./bin
  chmod 555 ./bin
  chown root ./dev
  chgrp wheel ./dev
  chmod 775 ./dev
  chown root ./etc
  chgrp wheel ./etc
  chmod 555 ./etc
  chown ftp ./pub
  chgrp other ./pub
  chmod 777 ./pub
  chown root ./usr
  chgrp wheel ./usr
  chmod 555 ./usr
  chown root ./usr/lib
  chgrp wheel ./usr/lib
  chmod 555 ./usr/lib

4.  Copy ftp files:

  cd ~ftp
  cp /usr/bin/ls ./bin
  cp /etc/group  ./etc
  cp /etc/passwd ./etc
  chown root ./bin/ls
  chgrp wheel ./bin/ls
  chmod 111 ./bin/ls
  chown root ./etc/passwd
  chgrp wheel ./etc/passwd
  chmod 444 ./etc/passwd
  chown root./etc/group
  chgrp wheel ./etc/group
  chmod 444 ./etc/group

5.  Edit ~ftp/etc/passwd to remove all encrypted passwords, replacing them
    with '*'s, e.g.:

        root:*:0:1:Operator:/:/bin/csh
        nobody:*:65534:65534::/:
        daemon:*:1:1::/:
        sys:*:2:2::/:/bin/csh
        bin:*:3:3::/bin:
        ftp:*:11:20::/home/hostname/ftp:

6.  Edit ~ftp/etc/group to remove all encrypted passwords, replacing them
    with '*'s, e.g.:

        wheel:*:0:
        nogroup:*:65534:
        daemon:*:1:
        kmem:*2:
        bin:*:3:
        tty:*:4:
        operator:*:5:
        news:*:6:
        uucp:*:8:
        audit:*:9:
        staff:*:10:
        other:*:20:

7.  Copy the runtime loader:

  cd ~ftp/usr/lib
  cp /usr/lib/ld.so .
  chown root ./ld.so
  chgrp wheel ./ld.so
  chmod 555 ./ld.so

8.  Copy additional libraries:

  cd ~ftp/usr/lib
  cp /usr/lib/libdl.so.* .
  chown root ./libdl.so.*
  chgrp wheel ./libdl.so.*
  chmod 555 ./libdl.so.*

9.  Create the zero device used by the runtime loader:

  cd ~ftp/dev
  mknod zero c 3 12
  chown root ./zero
  chgrp wheel ./zero
  chmod 644 ./zero

10.  Copy the latest version of shared C library.
     The last digit might be different on your system (e.g.: libc.so.1.9):

  cd ~ftp/usr/lib
  cp /usr/lib/libc.so.1.8 .
  chown root ./libc.so.1.8
  chgrp wheel ./libc.so.1.8
  chmod 555 ./libc.so.1.8

11.  If necessary, uncomment the ftpd line in /etc/inetd.conf:

ftp     stream  tcp     nowait  root    /usr/etc/in.ftpd        in.ftpd

and then restart the inetd:

  kill -HUP inetd-pid

12.  Test the anonymous ftp account.

You should be aware that this script has created ~ftp/pub with 777
(world-write) permissions. If you prefer more secure permissions,
execute a new chmod on ~ftp/pub after running this script.

 3.2: How to Set Up Anonymous FTP on a Solaris Machine?

 The following steps, on setting up Anonymous FTP on a Solaris machine,
 are copied from the 2.5 ftpd man page. It has been tested on 2.3, 2.4
 AND 2.5.  Please note that if you use the ftpd setup script from the
 2.3 or 2.4 man page there is an error  use this script instead.

 First, add the following entry to the /etc/passwd file. In this case,
 /export/ftp was chosen to be the anonymous ftp area, and the shell is
 the non-existent file /nosuchshell. This prevents users from logging
 in as the ftp user. Any of these variables can be changed at your
 discretion:

   ftp:x:30000:30000:Anonymous FTP:/export/ftp:/nosuchshell

 Second, add the following entry to /etc/shadow:

   ftp:NP:6445::::::

 Finally, cut and paste the following script, and run it on the machine
 that you are setting up as an anonymous FTP server:

#     The following is  a  shell  script  that  will  set  up  the
#     anonymous  ftp  area.   It  presumes that ftp accounts is set
#     up locally, as is suggested above.
#       This is a tested script from the Solaris 2.5 ftpd man page.
#       It has been tested on 2.3, 2.4, AND 2.5.
#
#!/bin/sh
# script to setup anonymous ftp area
#
# handle the optional command line argument
     case $# in

        # the default location for the anon ftp comes from the passwd file
        0) ftphome="`grep '^ftp:' /etc/passwd | cut -d: -f6`"
           ;;

        1) if [ "$1" = "start" ]; then
              ftphome="`grep '^ftp:' /etc/passwd | cut -d: -f6`"
           else
              ftphome=$1
           fi
           ;;

        *) echo "Usage: $0 [anon-ftp-root]"
           exit 1
           ;;
     esac

     if [ -z "${ftphome}" ]; then
        echo "$0: ftphome must be non-null"
        exit 2
     fi

     # This script assumes that ftphome is neither / nor /usr so ...
     if [ "${ftphome}" = "/" -o "${ftphome}" = "/usr" ]; then
        echo "$0: ftphome must not be / or /usr"
        exit 2
     fi

     # If ftphome does not exist but parent does, create ftphome
     if [ ! -d ${ftphome} ]; then
         # lack of -p below is intentional
         mkdir ${ftphome}
     fi
     echo Setting up anonymous ftp area ${ftphome}

     # Ensure that the /usr/bin directory exists
     if [ ! -d ${ftphome}/usr/bin ]; then
         mkdir -p ${ftphome}/usr/bin
     fi

     cp /usr/bin/ls ${ftphome}/usr/bin
     chmod 111 ${ftphome}/usr/bin/ls

     # Now set the ownership and modes to match the man page
     chown root ${ftphome}/usr/bin
     chmod 555 ${ftphome}/usr/bin

     # this might not be the right thing to do
     # but we need the bin -> usr/bin link
     if [ -r ${ftphome}/bin ]; then
         mv -f ${ftphome}/bin ${ftphome}/Obin
     fi
     ln -s usr/bin ${ftphome}

     # Ensure that the /usr/lib and /etc directories exist
     if [ ! -d ${ftphome}/usr/lib ]; then
         mkdir -p ${ftphome}/usr/lib
     fi
     if [ ! -d ${ftphome}/etc ]; then
         mkdir -p ${ftphome}/etc
     fi

     #Most of the following are needed for basic operation, except
     #for libnsl.so, nss_nis.so, libsocket.so, and straddr.so which are
     #needed to resolve NIS names.

     cp /usr/lib/ld.so /usr/lib/ld.so.1 ${ftphome}/usr/lib

     for lib in libc libdl libintl libw libnsl libsocket        nss_nis
nss_nisplus nss_dns nss_files
     do
        cp /usr/lib/${lib}.so.1 ${ftphome}/usr/lib
        rm -f ${ftphome}/usr/lib/${lib}.so
        ln -s ./${lib}.so.1 ${ftphome}/usr/lib/${lib}.so
     done

     cp /usr/lib/straddr.so.2 ${ftphome}/usr/lib
     rm -f ${ftphome}/usr/lib/straddr.so
     ln -s ./straddr.so.2 ${ftphome}/usr/lib/straddr.so

     cp /etc/passwd /etc/group /etc/netconfig ${ftphome}/etc

     # Copy timezone database
     mkdir -p ${ftphome}/usr/share/lib/zoneinfo
     (cd ${ftphome}/usr/share/lib/zoneinfo
       (cd /usr/share/lib/zoneinfo; find . -print | cpio -o) | cpio -imdu
       find . -print | xargs chmod 555
       find . -print | xargs chown root
     )

     chmod 555 ${ftphome}/usr/lib/*
     chmod 444 ${ftphome}/etc/*

     # Now set the ownership and modes
     chown root ${ftphome}/usr/lib ${ftphome}/etc
     chmod 555 ${ftphome}/usr/lib ${ftphome}/etc

     # Ensure that the /dev directory exists
     if [ ! -d ${ftphome}/dev ]; then
         mkdir -p ${ftphome}/dev
     fi

     # make device nodes. ticotsord and udp are necessary for
     # 'ls' to resolve NIS names.

     for device in zero tcp udp ticotsord
     do
        line=`ls -lL /dev/${device} | sed -e 's/,//'`
        major=`echo $line | awk '{print $5}'`
        minor=`echo $line | awk '{print $6}'`
        rm -f ${ftphome}/dev/${device}
        mknod ${ftphome}/dev/${device} c ${major} ${minor}
     done

     chmod 666 ${ftphome}/dev/*

     ## Now set the ownership and modes
     chown root ${ftphome}/dev
     chmod 555 ${ftphome}/dev

     if [ ! -d ${ftphome}/pub ]; then
        mkdir -p ${ftphome}/pub
     fi
     chown ftp ${ftphome}/pub
     chmod 777 ${ftphome}/pub

#End of Solaris 2.x anonymous ftp script

This script creates ~ftp/pub with 777
(world-write) permissions. If you prefer more secure permissions,
execute a new chmod on ~ftp/pub after running this script.

 3.3: How to Start Logging with FTP?

You can log ftpd connections, which tell you which
hosts have connected to your system using this procedure.

STEP 1: add the -l option to ftpd in the
/etc/inetd.conf file as follows:

  ftp    stream  tcp  nowait  root  /usr/sbin/in.ftpd  in.ftpd -l

(This is the line from the Solaris inetd.conf  SunOS is very
similar, though the location of in.ftpd is different.)

STEP 2:
You will also need to modify syslog.conf by adding the following
line (make sure you use TABs and not SPACES - especially if you cut
and paste this line):

  daemon.info                   /var/adm/ftp.log

STEP 3:
Create the /var/adm/ftp.log file:
touch /var/adm/ftp.log

STEP 4:
Restart both inetd and the syslogd:

  %%%% kill -HUP inetd-pid
  %%%% kill -HUP syslog-pid

ftp should begin logging to /var/adm/ftp.log immediately.

If you have other daemons which also log information messages, you
will find that they get logged to this file as well. If this is the
case, you will probably want to turn off informational messages on
your other daemons  by default standard Solaris daemons will not log
informational messages.

You can view more detail on ftp logins to an FTP server.
SunOS ftpd logs into /var/adm/wtmp.
Solaris ftpd logs into /var/adm/wtmpx.
You do NOT need to enable the ftpd logging described above.
You can view this detailed info using the "last" command.
Here is some example output from last   grep ftp on Solaris:

hackley   ftp          mercedes         Tue Apr  2 10:52 - 10:52  (00:00)
hackley   ftp          mercedes         Thu Mar 28 10:30 - 10:30  (00:00)

 3.4: How to Set Up TFTP?

To allow your machine to serve TFTP requests, uncomment the following
line from /etc/inetd.conf:

  tftp  dgram   udp     wait    root    /usr/sbin/in.tftpd    in.tftpd -s
/tftpboot

(This is the line from the Solaris inetd.conf  SunOS is very
similar, though the location of in.tftpd is different.)

Next, create the tftp user home directory:

  %%%% mkdir /tftpboot
  %%%% chown root /tftpboot
  %%%% chmod 777 /tftpboot

Finally, restart inetd:

  %%%% kill -HUP inetd-pid

You can verify TFTP is working by putting a file in /tftpboot, and then,
running the command:

  %%%% tftp machine-name
  tftp> get filename

Note that TFTP does not work the same as FTP  you won't see the same
messages, and can't use 'cd', 'ls' or most other FTP commands.

 3.5  How do I set up or enable "automatic login" with ftp?

Use the .netrc file in the user's home  directory on the machine
initiating the transfer (e.g. using the ftp command)

The .netrc might have one or more lines resembling
machine remotehost login remoteuser password remotepass

For example, a .netrc file containing the following line:

machine ray login demo password mypassword

allows an autologin to the host called ray using the login
name "demo" with password "mypassword".

NOTE:
The .netrc file mode MUST be 600, owned by the user.
Or you will get the error when starting ftp:
"Error - .netrc file not correct mode.
Remove password or correct mode."

 3.6  How do I set up FTP anonymous ftp sub-logins?

NOTE: Sub-logins for ftp ONLY work under Solaris 2.x!

Anonymous ftp sub-logins allow
you to configure an anonymous ftp server, and
customizing it for different users - i.e. to give
each user their own home directory, and be able to
set permissions on each home directory so that others
can't see or transfer files from within them.

This also will prevent all users logging in via
this method to ever go beyond the directory
hierarchy of ~ftp due to anonymous ftp using the
chroot function.

What this entails at the user end is logging in twice -
once as an anonymous ftp user, and then once again as
themselves using the 'user' command from the ftp prompt.

An example:

ivy -> ftp ivy
Connected to ivy.
220 ivy FTP server (UNIX(r) System V Release 4.0) ready.
Name (ivy:betsym): anonymous
331 Guest login ok, send ident as password.
Password:
230 Guest login ok, access restrictions apply.
ftp> user betsym
331 Password required for betsym.
Password:
230 User betsym logged in.
ftp> pwd
257 "/betsym" is current directory.
ftp> ls
200 PORT command successful.
150 ASCII data connection for /bin/ls (129.151.21.49,41058) (0 bytes).
226 ASCII Transfer complete.
ftp>

How to Set Up Sub-logins with anonymous ftp:

1.  Setup anonymous ftp as you normally would.

2.  Edit the ~ftp/etc/passwd file and add the
    user entry.  If you are running 2.3 or 2.4,
    you need the encrypted passwd from the shadow file
    instead of the "x" in the password field.
    If you are using /bin/false as a shell, remember that it
    needs to be listed in ~ftp/etc/shells.

3.  Edit the ~ftp/etc/passwd file directory entry
    for the user if needed.
    Keep in mind that the home directory will be in
    the ~ftp directory, but as far as ftp knows,
    ~ftp is really '/', so the home directory should
    be listed as /betsym in the ~ftp/etc/passwd file,
    but it will really live at ~ftp/betsym.

    EDITORS NOTE:  At 2.5, the ftpd picks up the home directory
    from /etc/passwd, or the passwd database in NIS or NIS+.

4.  Create the home directory inside ~ftp for the user
    with appropriate permissions.  For example:
    mkdir ~ftp/betsym
    chown betsym ~ftp/betsym
    chmod 755 ~ftp/betsym

The following Steps must also be done if you are running
Solaris 2.5 or above:

4.  Edit the ~ftp/etc/shadow file for the user
    with the encrypted passwd. For example:
    betsym:LrMIABiTAd892:9561:::::

5.  chmod 400 ~/ftp/etc/shadow
    chown root ~/ftp/etc/shadow

6.  cd ~ftp
    mkdir usr/lib/security
    cp /usr/lib/security/pam_entry.so usr/lib/security/pam_entry.so
    mkdir etc/lib
    cp /etc/lib/pam_entry.so etc/lib/pam_entry.so

4.0 Some Frequently Asked Questions

 4.1: Miscellaneous Questions

Q1: How do I get ftpd to print a special message on login?
Q2: How do I get ftpd to print messages for certain directories?
Q3: How do I restrict the number of FTP sessions?
Q4: How do I get ftpd to automatically uncompress/untar files?

A: Sun's ftpd meets the standard specs for a FTP server. However, it
does not offer much additional functionality, which some recent
public-domain ftp servers have provided. If you need that additional
functionality, the best public domain FTP server is probably the
wu-ftpd, which can be retrieved from wuarchive.wustl.edu. However,
that ftpd is not supported by SunService.

Q5: How do I get a script to work with FTP?  Do you have an example?

A5: First, you will need to set up a ".netrc" file on the FTP server.
    See Section 3.5 on how to do this.
    Then, create an FTP script on the FTP client.  Here is an
    example script that pulls RFC's using anonymous FTP:

#!/bin/sh
#
# usage:
#       getrfc 822 1066 ...
(
        echo user anonymous $USER@yoursite.com
        echo cd rfc
        for n do
                echo get rfc${n}.txt rfc${n}
        done
        echo bye
) !  ftp -i -n -v nic.internic.net
  ^^
  There should be a PIPE symbol instead of a ! (sorry, due
  to limitation on our PSD database system at Sun)

 4.2: Common FTP Client Problems

Q: Why does ftp core dump on my SunOS machine when I try and access
certain remote machines?

A: This is a known bug that occurs when a remote machine has multiple
addresses. It is fixed in the libc patch for 4.1.3 and 4.1.3_u1. See
section 5.1 below.

Q: Why do some remote sites refuse to let me ftp to them, complaining
that they can't lookup my server name?

A: This is probably because the machine you are ftping from does not
have a DNS PTR record. You should consult your DNS maps, and verify
that both A and PTR records are being propagated for the machine in
question. SunService has a document on DNS which explains this all
in more depth.

 4.3: Common FTP Server Problems

Q: Why does a user get the following error when he tries to ftp to a
local machine:

  "530 user <user> access denied."

A1: Your user has a non-standard shell. On the machine that he is
trying to ftp to, create a file called /etc/shells, add the user's
shell, and also add all of the standard shells, as the list of
defaults will not be used if an /etc/shells file exists.

The following example lists all of the default Solaris shells, and
also adds on one non-standard shell at the end. It should also be fine
for SunOS machines:

  %%%% cat /etc/shells
  /usr/bin/sh
  /usr/bin/csh
  /usr/bin/ksh
  /usr/bin/jsh
  /bin/sh
  /bin/csh
  /bin/ksh
  /bin/jsh
  /sbin/sh
  /sbin/jsh
  /usr/local/bin/tcsh

A2: Your user is listed in the file /etc/ftpusers on the machine he is
trying to ftp to. All users who have entries in that file are
automatically denied FTP access.

 4.4: Anonymous FTP Problems

Q1: Why can I not 'ls' when I log in to my Anonymous FTP site?
Q2: Why do I get the following error when I try and 'ls' in my
Anonymous FTP:

  "can't create data socket (0.0.0.0,20): No such device or address"

A1: Your Anonymous FTP directory has not been set up correctly. If you
did it by hand, try using the appropriate script in Section 3.1 or 3.2
above.

A2: Your Anonymous FTP directory is on a partition which has been
mounted with the option -nosuid. This can be verified by examining
either the /etc/fstab (SunOS) or /etc/vfstab (Solaris) file. To
correct this problem, you must remove the nosuid option from the
appropriate file, and then remount the partition, most likely by
rebooting the machine.

Q: Why do I get the following error when I log in to my anonymous FTP
account? This seems to happen after anonymous FTP has been running
correctly for a while:

  "Can't create data socket (150.203.21.26,20): Interrupted system call."

A: This is a known bug #1167893, under Solaris 2.4. It is currently
being investigated. Rebooting the machine will return Anonymous FTP
to its correctly working state.

Q:  Why can't I run the "user" and "pass" commands when logged in
to a SunOS 4.X anonymous ftp server?  I see the error "can't change user
from guest login."

A:  You can't do this.  SunOS does NOT permit ftp sub-logins on
    anonymous ftp.

 4.5: TFTP Questions

Q: What are the security ramifications of running tftpd?

A: There are security concerns with TFTP because it allows users to
retrieve files without supplying a username or passwd. This means that
if it were run without any arguments, anyone could retrieve any
world-readable file from your system.

However, tftpd usually runs with the arguments "-s /tftpboot". This
restricts tftp to only accessing the files under the /tftpboot
directory.  Anyone could still access any file under the /tftpboot
directory, but usually the files kept there will not be of any
security concern.

5.0 Patches

 5.0: Patches

The following is the list of all of the FTP related patches for 4.1.3,
4.1.3_u1, 4.1.4, 5.3 and 5.4. If you are having FTP problems,
installing the patches is a good place to start, especially if you
recognize the general symptoms noted below.

In order for a machine to be stable, all of the recommended patches
should be installed as well. The list of recommended patches for your
operating system is available from sunsolve.sun.com.

 5.1: FTP Patches for SunOS

100557-04 SunOS 4.1.2, 4.1.3: ftp Jumbo Patch

  Corrects minor problems in /usr/ucb/ftp related to mput and the
  .netrc file.

100865-03 SunOS 4.1.2, 4.1.3: FTP fixes

  Corrects some problems with in.ftpd involving permissions and an
  "Interrupted System Call" error. Should be installed on 4.1.2
  or 4.1.3 FTP servers.

101640-03 SunOS 4.1.3: in.ftpd logs password info when -d option is used

  Closes a security hole in in.ftpd, which caused passwords to be
  logged, if ftpd is running with the -d option. Unfortunately, this
  patch conflicts with 100865 above, and only one of the two can be
  installed. Of the two, 100865 should probably be selected for
  installation, unless you are specifically planning to run in.ftpd
  with the -d option.

101625-02 SunOS 4.1.3_u1: ftp does not prompt for account information

  Corrects a minor problem in /usr/ucb/ftp.

5.1.1: Related Patches for SunOS

100891-13 SunOS 4.1.3: international libc jumbo patch
100890-13 SunOS 4.1.3: domestic libc jumbo patch
101558-07 SunOS 4.1.3_U1: international libc jumbo patch
101759-04 SunOS 4.1.3_U1: domestic libc jumbo patch

  Correct a problem where ftp, ping and other internet connection
  programs coredump if they try and connect to a machine with multiple
  A records. Please be sure to install the domestic version, and not
  the international version, if you are in the US, because the
  international version does not include encryption, which is
  necessary for login to work correctly.

 5.2: FTP Patches for Solaris

101653-01 SunOS 5.3: case mapping in ftp doesn't work for the mget command

  Fixes a minor conflict in ftp between the case and mget commands.

 5.3: TFTP Patches for Solaris

102773-01 SunOS 5.4: in.tftpd very slow on solaris 2.4

  Corrects an error where tftp could run very slowly and give "child status
  has changed" messages. Currently is only available as a T (test)
  patch. If this is a large problem for you, ask a SunService engineer
  if you can be sent the preliminary patch.

6.0 Known Bugs and RFEs

 6.0: Known Bugs & RFEs

The following bugs & rfes reflect currently open issues with the FTP
software.

 6.1: Bugs

1167893   FTPD fails: 425 Can't create data socket (129.148.5.117,20): Inte

  Occasionally, after anonymous FTP has been running for a while on a
  Solaris 2.4 machine, it will start failing with "Interrupted System
  Call" errors. This bug is currently under investigation.

 6.2: RFEs

1030210   Allow ftp set file permissions upon file transfers

  Currently, when a user 'put's a file to a Sun machine, the file ends
  up with permissions of 666. This RFE requests that the user's umask
  instead be respected.

7.0 References

 7.1: Important Man Pages

  ftp
  ftpd
  ftpusers
  netrc
  tftp
  tftpd

 7.2 Sunsolve Documents

There are a number of Sunsolve documents concerning FTP. The ones
listed below are simply those which contain some information
which is not already in this document.

7.2.1: FAQs

1285      Relationship between ftp and inetd.conf

7.2.2: SRDBs

3035      how to set up cron to automate a ftp session
4099      Change in ftp packet sizes
4742      Transferring binary or executable files via ftp or tftp
11195     Files created by in.ftpd always have permissions 666 at

 7.3 Sun Educational Services

[pending]

 7.4: Solaris Documentation

[pending]

 7.5: Third Party Documentation

_Managing Internet Information Services_, by Liu, Peek, Jones, Buus &
Nye, published by O'Reilly & Associates, ISBN #1-56592-062-7

  This book, dedicated to all the different Internet services (WWW,
  Gopher, WAIS, etc), includes three chapters on setting up and
  maintaining an FTP archive.

 7.6: RFCs

RFCs are the internet-written documents that define the specifications
of many common networking programs. RFCs can be retrieved from
nic.ddn.mil, in the /rfc directory, or through the following link.

link to: http://www.cis.ohio-state.edu/hypertext/information/rfc.html

640     Revised FTP Reply Codes

  Definition of the numerical codes that FTP returns after each
  action.

959     File Transfer Protocol

  Spec for the FTP protocol.

1350    THE TFTP PROTOCOL (REVISION 2)

  Spec for the TFTP protocol.

1635    How to Use Anonymous FTP

  Introductory document on using FTP to access anonymous sites.

 8.0: Supportability

SunService is not responsible for the initial configuration of your
Anonymous FTP server. In addition, SunService can not diagnose your
FTP performance problems, or suggest network tuning guidelines.

We can help resolve problems where FTP is not behaving correctly, but
in such cases the contact must be a system administrator who has a
good understanding of the network.

 9.0: Additional Support

For initial configuration or network performance tuning guidelines,
please contact your local SunService office for possible consulting
offerings. Sun's Customer Relations organization can put you in touch
with your local SunIntegration or Sales office. You can reach Customer
Relations at 800-821-4643.
Bug ID n/a
Patch ID n/a
Product Area Gen. Network
Product FTP
OS any
Release n/a
Hardware any

Top

SunWeb Home SunWeb Search SunSolve Home Simple Search

Sun Proprietary/Confidential: Internal Use Only
Feedback to SunSolve Team