HP Visualize J210XC IRIX to HP-UX Migration Guide - Page 70

usr/bin, ftp/usr/bin, ftp/usr, etc/passwd, etc/group, ftp/etc, home/ftp/etc/passwd, home/ftp/etc/

Page 70 highlights

Configuring TCP/IP 4. Copy the ls and pwd commands from /usr/bin to ~ftp/usr/bin, and set the permissions on the commands to 0111 (executable only): # cp /usr/bin/ls /home/ftp/usr/bin # cp /usr/bin/pwd /home/ftp/usr/bin # chmod 0111 /home/ftp/usr/bin/ls # chmod 0111 /home/ftp/usr/bin/pwd 5. Set the owner of the ~ftp/usr/bin and ~ftp/usr directories to root, and set the permissions to 0555 (not writeable): # chown root /home/ftp/usr/bin # chmod 0555 /home/ftp/usr/bin # chown root /home/ftp/usr # chmod 0555 /home/ftp/usr 6. Create the subdirectory etc under the ftp home directory: # cd /home/ftp # mkdir etc 7. Copy /etc/passwd and /etc/group to ~ftp/etc. These files are required by the ls command, to display the owners of the files and directories under ~ftp: # cp /etc/passwd /home/ftp/etc # cp /etc/group /home/ftp/etc 8. Replace the password field in all entries in /home/ftp/etc/passwd with *, and delete the shell field from the end of each entry: ftp:*:500:guest:anonymous ftp:/home/ftp: acb:*:8996:20::/home/acb: 9. Replace the password field in all entries in /home/ftp/etc/group with *: users:*:20:acb guest:*:21:ftp 10. Set the owner of the files in ~ftp/etc to root, and set the permissions to 0444 (read only): # chown root /home/ftp/etc/passwd # chmod 0444 /home/ftp/etc/passwd # chown root /home/ftp/etc/group # chmod 0444 /home/ftp/etc/group 11. Set the owner of ~ftp/etc to root, and set the permissions to 0555 (not writeable): # chown root /home/ftp/etc # chmod 0555 /home/ftp/etc 12. Create a directory called pub under ~ftp. Set its owner to user ftp and its permissions to 0777 (writeable by all). 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 0777 /home/ftp/pub 65

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125

Configuring TCP/IP
65
4.
Copy the
ls
and
pwd
commands from
/usr/bin
to
~ftp/usr/bin
, and set the permissions on the
commands to
0111
(executable only):
# cp /usr/bin/ls /home/ftp/usr/bin
# cp /usr/bin/pwd /home/ftp/usr/bin
# chmod 0111 /home/ftp/usr/bin/ls
# chmod 0111 /home/ftp/usr/bin/pwd
5.
Set the owner of the
~ftp/usr/bin
and
~ftp/usr
directories to
root
, and set the permissions to
0555
(not
writeable):
# chown root /home/ftp/usr/bin
# chmod 0555 /home/ftp/usr/bin
# chown root /home/ftp/usr
# chmod 0555 /home/ftp/usr
6.
Create the subdirectory
etc
under the
ftp
home directory:
# cd /home/ftp
# mkdir etc
7.
Copy
/etc/passwd
and
/etc/group
to
~ftp/etc
. These files are required by the
ls
command, to display
the owners of the files and directories under
~ftp
:
# cp /etc/passwd /home/ftp/etc
# cp /etc/group /home/ftp/etc
8.
Replace the password field in all entries in
/home/ftp/etc/passwd
with
*
, and delete the shell field
from the end of each entry:
ftp:*:500:guest:anonymous ftp:/home/ftp:
acb:*:8996:20::/home/acb:
9.
Replace the password field in all entries in
/home/ftp/etc/group
with
*
:
users:*:20:acb
guest:*:21:ftp
10. Set the owner of the files in
~ftp/etc
to
root
, and set the permissions to
0444
(read only):
# chown root /home/ftp/etc/passwd
# chmod 0444 /home/ftp/etc/passwd
# chown root /home/ftp/etc/group
# chmod 0444 /home/ftp/etc/group
11. Set the owner of
~ftp/etc
to
root
, and set the permissions to
0555
(not writeable):
# chown root /home/ftp/etc
# chmod 0555 /home/ftp/etc
12. Create a directory called
pub
under
~ftp
. Set its owner to user
ftp
and its permissions to
0777
(writeable by all). 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 0777 /home/ftp/pub