How can I set up a directory for ftp anonymous?

Gary Weimer weimer at ssd.kodak.com
Tue Nov 27 05:42:16 AEST 1990


In article <1990Nov23.224555.1411 at portia.Stanford.EDU> hines at portia.Stanford.EDU (Melissa Hines) writes:
>Q: How do I set up a directory so that it can be accessed via an ftp anonymous
>   session? 
>
>System: DECstation 3100
>        Ultrix 3.0 (Rev. 7)
>
>I am a very infrequent UNIX user, so please pardon my ignorance.  Basically,
>I would like to set up a directory that other users of a certain Mac software
>package could access.  I have asked the "superuser" on this machine for help,
>but he couldn't figure out how to do this.

In SunOS (Un*x for Sun machines), anonymous ftp performs a chroot() to the
ftp home directory (specified in the /etc/passwd file). To get access to a
directory, the ftp home directory must be at or below it. Example:

ftp entry in /etc/passwd:
    ftp::500:25:anonymous ftp account:/a/b/c:/bin/sh

anonymous ftp will have access to:
    /a/b/c
    /a/b/c/d
    /a/b/c/e
    /a/b/c/e/f
    :
    :

anonymous ftp will not have access to:
    /a/b
    /a
    /a/b/d
    :
    :

NOTE: the following files are required for anonymous ftp to work (~ftp is
      the ftp home directory--/a/b/c in example above):

    ~ftp/bin/ls
    ~ftp/dev/zero
    ~ftp/usr/lib/ld.so
    ~ftp/usr/lib/libc.so.*
    ~ftp/etc/passwd
    ~ftp/etc/group

See man page for ftpd(8c) for more information.

Gary Weimer



More information about the Comp.unix.questions mailing list