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

ftp/bin/ls

Page 61 highlights

Configuring TCP/IP The login shell /dev/null is recommended, but not required, and the home directory can be anywhere, with exceptions as explained in the next step. 2. Create an FTP home directory: # mkdir /disk2/ftp 3. Change directory to the ftp home directory, and create the subdirectories used for FTP access: # cd /disk2/ftp # mkdir bin dev etc lib pub incoming 4. Copy the ls command from /sbin to ~ftp/bin: # cp /sbin/ls bin 5. Copy /etc/passwd and /etc/group to ~ftp/etc, and edit them to an acceptable minimum: # cp /etc/passwd /etc/group etc A good choice for the contents of ~ftp/etc/passwd might be: root:*:0:0:Super-User:/:/dev/null bin:*:2:2:System Tools Owner:/bin:/dev/null sys:*:4:0:System Activity Owner:/var/adm:/dev/null ftp:*:997:999:Anonymous FTP Account:/disk2/ftp:/dev/null A good choice for the contents of ~ftp/etc/group might be: sys:*:0: other::995: guest:*:998: 6. Add appropriate device and library files for anonymous FTP as follows: # /sbin/mknod dev/zero c 37 0 # cp /lib/libc.so.1 /lib/rld lib The dev/zero file helps zero out sensitive data; ~ftp/bin/ls requires the library files. 7. Set restrictive permissions on ~ftp/etc/passwd, ~ftp/etc/group and ~ftp/dev/zero: # chmod 444 etc/* dev/* 8. Make sure the bin, dev, etc, lib and ~ftp directories are owned by root, and the group (set to sys) has restricted write permission: # chown root.sys bin dev etc lib . # chmod 511 bin dev etc lib . In the chown command, the dot separates owner and group. 9. For the pub directory, set the owner to root, the group to sys, and activate global read and access permission: 56

  • 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
56
The login shell
/dev/null
is recommended, but not required, and the home directory can be anywhere,
with exceptions as explained in the next step.
2.
Create an FTP home directory:
#
mkdir /disk2/ftp
3.
Change directory to the
ftp
home directory, and create the subdirectories used for FTP access:
#
cd /disk2/ftp
#
mkdir bin dev etc lib pub incoming
4.
Copy the
ls
command from
/sbin
to
~ftp/bin
:
#
cp /sbin/ls bin
5.
Copy
/etc/passwd
and
/etc/group
to
~ftp/etc
,
and edit them to an acceptable minimum:
#
cp /etc/passwd /etc/group etc
A good choice for the contents of
~ftp/etc/passwd
might be:
root:*:0:0:Super-User:/:/dev/null
bin:*:2:2:System Tools Owner:/bin:/dev/null
sys:*:4:0:System Activity Owner:/var/adm:/dev/null
ftp:*:997:999:Anonymous FTP Account:/disk2/ftp:/dev/null
A good choice for the contents of
~ftp/etc/group
might be:
sys:*:0:
other::995:
guest:*:998:
6.
Add appropriate device and library files for anonymous FTP as follows:
#
/sbin/mknod dev/zero c 37 0
#
cp /lib/libc.so.1 /lib/rld lib
The
dev/zero
file helps zero out sensitive data;
~ftp/bin/ls
requires the library files.
7.
Set restrictive permissions on
~ftp/etc/passwd, ~ftp/etc/group
and
~ftp/dev/zero
:
# chmod 444 etc/* dev/*
8.
Make sure the
bin, dev, etc, lib
and
~ftp
directories are owned by
root
, and the group (set to
sys)
has
restricted write permission:
# chown root.sys bin dev etc lib .
# chmod 511 bin dev etc lib .
In the
chown
command, the dot separates owner and group.
9.
For the
pub
directory, set the owner to
root
, the group to
sys
, and activate global read and access
permission: