Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Configuring a Workgroup
Sharing Files and Applications via NFS and ftp
Chapter 4410
mkdir /home/ftp
b. Create the subdirectory /usr/bin under the ftp home directory, for
example:
cd /home/ftp
mkdir usr
cd usr
mkdir bin
Step 3. Copy the ls and pwd commands from /sbin and /usr/bin (respectively)
to ~ftp/usr/bin, and set the permissions on the commands to
executable only (mode 0111):
cp /sbin/ls /home/ftp/usr/bin
cp /usr/bin/pwd /home/ftp/usr/bin
chmod u=x,g=x,o=x /home/ftp/usr/bin/ls
chmod u=x,g=x,o=x /home/ftp/usr/bin/pwd
Step 4. Set the owner of the ~ftp/usr/bin and ~ftp/usr directories to root,
and set the permissions to not writable (mode 0555):
chown root /home/ftp/usr/bin
chmod u=rx,g=rx,o=rx /home/ftp/usr/bin
chown root /home/ftp/usr
chmod u=rx,g=rx,o=rx /home/ftp/usr
Step 5. Create the subdirectory etc under the ftp directory, for example:
cd /home/ftp
mkdir etc
Step 6. Copy /etc/passwd and /etc/group to ~ftp/etc.
These files are required by the ls command, to display the owners of files
and directories under ~ftp.
cp /etc/passwd /home/ftp/etc
cp /etc/group /home/ftp/etc
Step 7. In all entries in /home/ftp/etc/passwd, replace the password field with
an asterisk (*), and delete the shell field, for example:
ftp:*:500:1:anonymous ftp:/home/ftp:
tom:*:8996:20::/home/tom: