HP-UX System Administrator's Guide: Configuration Management
6. Select Enable.
HP SMH executes commands that create a password entry in the appropriate files,
creates the ftp user account, and sets up the needed files and programs.
The entry in /etc/passwd is usually:
ftp:*:500:1:Anonymous FTP user:/home/ftp:/usr/bin/false
The created files and directories are:
dr-xr-xr-x 6 root other 96 Oct 29 21:48 /home/ftp
dr-xr-xr-x 2 root other 96 Oct 29 21:48 /home/ftp/etc
-r--r--r-- 1 root other 1272 Oct 29 21:48 /home/ftp/etc/passwd
-r--r--r-- 2 root other 226 Oct 29 21:48 /home/ftp/etc/group
-r--r--r-- 2 root other 226 Oct 29 21:48 /home/ftp/etc/logingroup
dr-xr-xr-x 4 root other 96 Oct 29 21:48 /home/ftp/usr
dr-xr-xr-x 2 root other 96 Oct 29 21:48 /home/ftp/usr/bin
---x--x--x 1 root other 479232 Oct 10 21:39 /home/ftp/usr/bin/ls
dr-xr-xr-x 2 root other 96 Oct 29 21:48 /home/ftp/usr/lib
-r--r--r-- 1 root other 17782 Oct 10 21:43 /home/ftp/usr/lib/tztab
dr-xr-xr-x 2 root other 96 Oct 29 21:48 /home/ftp/dist
drwxrwxrwx 2 ftp other 96 Oct 29 21:48 /home/ftp/pub
Configuring Anonymous FTP with HP-UX Commands
1. Add user ftp to /etc/passwd, usually:
ftp:*:500:1:anonymous FTP:/home/ftp:/usr/bin/false
The password field should be *, the group membership should be guest, or, as
in this example, other, and the login shell should be /usr/bin/false.
In this example, user ftp’s user ID is 500, and the anonymous FTP directory is
/home/ftp.
2. Create the ftp home directory:
a. Create the ftp home directory that you referred to in the /etc/passwd file,
usually:
# mkdir /home/ftp
b. Create the subdirectories usr/bin and /usr/lib under the ftp home
directory, usually:
# cd /home/ftp
# mkdir -p usr/bin
3. Copy the ls command from /sbin to /home/ftp/usr/bin, and set the
permissions on the command to execute only (mode 0111):
# cp /sbin/ls /home/ftp/usr/bin
# chmod u=x,g=x,o=x /home/ftp/usr/bin/ls
4. Set the owner of the /home/ftp/usr/bin and /home/ftp/usr directories to
root, and set the permissions to read-execute (not writable) (mode 0555):
# chown root /home/ftp/usr/bin
# chmod u=rx,g=rx,o=rx /home/ftp/usr/bin
88 Configuring Networking