Technical article 107580

The ls and dir commands don't work on my anonymous ftp server.

OpenServer 5.0.0

Written · Last revised

Problem

The ls and dir commands don't work on my anonymous ftp server.

Cause

When accessing the "ftp" account, using anonymous ftp, the
system makes a chroot call to keep the user from accessing
files outside the ftp home directory.  Because of this
restriction, certain programs must be put in the ftp home
directory.
The information given in the printed manual, SCO OpenServer
Networking Guide, is not correct.  It excludes the
/lib/libprot.so.1 library.  This is one of several libraries
necessary for the ls command to function properly in anonymous
ftp.

Solution

The script in the online documentation is correct.  To solve
this problem, take these steps:
1. Log in as root.

2. Create a user called "ftp" with the Account Manager. Do not give that user a password.

3. Create the following directory setup in ftp's home directory:

# csh
# cd ~ftp
# chmod 755 .; chown root .; chgrp root .
# mkdir bin dev etc lib pub usr usr/lib
# chown root bin etc dev lib usr usr/lib
# chmod 555 bin etc dev lib usr usr/lib
# chown ftp pub
# chmod 777 pub
# cd bin
# cp /bin/ls .
# chmod 111 ls
# cd ../etc
# cp /etc/passwd .
# cp /etc/group .
# chmod 444 passwd group
# cd ../lib
# cp /lib/libprot.so.1 .
# chmod 555 lib*
# chown bin lib*
# cd ../usr/lib
# cp /usr/lib/libc.so.1 .
# cp /usr/lib/libsocket.so.1 .
# chmod 555 lib*
# chown bin lib*
# cd ../..
# find /dev/socksys -print | cpio -dumpv ~ftp
# find /dev/zero -print | cpio -dumpv ~ftp

See also

Networking Guide Chapter 3, Administering TCP/IP

From the Xinuos technical article database, record 107580. Reproduced with permission. The original is at www.sco.com/ta/107580, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.