HP-UX System Administrator's Guide: Configuration Management
# chown root /home/ftp/usr
# chmod u=rx,g=rx,o=rx /home/ftp/usr
5. Create the subdirectory etc under the ftp directory:
# cd /home/ftp
# mkdir etc
6. Copy /etc/passwd and /etc/group to /home/ftp/etc.
These files are required by the ls command, to display the owners of files and
directories under /home/ftp.
# cp /etc/passwd /home/ftp/etc
# cp /etc/group /home/ftp/etc
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:
8. In all entries in /home/ftp/etc/group, replace the password field with an
asterisk (*):
users:*:20:acb
guest:*:21:ftp1
9. Change the owner of the files in /home/ftp/etc to root, and set the permissions
to read only (mode 0444):
# chown root /home/ftp/etc
# chmod u=r,g=r,o=r /home/ftp/etc
10. Create a directory pub (for public) under /home/ftp, and change its owner to
user ftp and its permissions to writable by all (mode 0777).
Anonymous FTP users can put files in this directory to make them available to
other anonymous FTP users.
# mkdir /home/ftp/pub
# chown ftp /home/ftp/pub
# chmod u=rwx,g=rwx,o=rwx /home/ftp/pub
You can create other directories to provide separate categories, such as /home/
ftp/draft and /home/ftp/final.
11. Create a directory dist (for distribution) under /home/ftp. Change its owner
to root and its permissions to writable only by root (mode 0755).
Anonymous FTP users can read but not alter these directories.
# mkdir /home/ftp/dist
# chown root /home/ftp/dist
# chmod u=rwx,g=rx,o=rx /home/ftp/dist
Configuring File Transfer Protocol (FTP) 89