Question & Answer
Question
How do I turn FTP on/off for the Red Hat 5.2 NPS server?
Answer
Although FTP is shipped with the Red Hat 5.2 NPS server, it is disabled by default.
To enable it, you need to edit a file and turn the service on. You must be the root user to do this.
- [root@nps_server ~]# cd /etc/xinetd.d
[root@nps_server xinetd.d]# vi gssftp
# default: off
# description: The kerberized FTP server accepts FTP connections \
# that can be authenticated with Kerberos 5.
service ftp
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/ftpd
server_args = -l -a
log_on_failure += USERID
}
Change the line:
- server_args = -l -a
to
- server_args = -l
Save the file and exit. Now turn the service on and restart the xinetd daemon:
- [root@nps_server xinetd.d]# chkconfig gssftp on
[root@nps_server xinetd.d]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
Verify that the changes took effect and that FTP is now available from an external source:
- user@my-laptop:~$ ftp 192.168.100.10
Connected to 192.168.100.10.
220 nps_server FTP server (Version 5.60) ready.
Name (192.168.100.10:user): nz
331 Password required for nz.
Password:
230 User nz logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 76
-rw------- 1 nz 14866 May 4 15:18 .bash_history
-r-xr-xr-x 1 nz 1309 Nov 5 16:33 .bash_profile
-r-xr-xr-x 1 nz 616 Nov 5 16:33 .bashrc
-rw------- 1 nz 55 Feb 10 13:42 .lesshst
-rw------- 1 nz 12882 Apr 6 10:31 .nzsql_history
drwx------ 2 nz 4096 Nov 7 14:16 .ssh
-rw-rw-r-- 1 nz 7557 Jan 31 10:39 test.dat
-rw-rw-r-- 1 nz 0 Jan 27 13:09 typescript
226 Transfer complete.
ftp> quit
221 Goodbye.
To turn off ftp, do the following as root:
[root@ibm06002 xinetd.d]# chkconfig gssftp off
[root@ibm06002 xinetd.d]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
You can then check that FTP is no longer available:
- user@my-laptop:~$ ftp 192.168.100.10
ftp: connect: Connection refused
ftp> quit
[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Historical Number
NZ478797
Was this topic helpful?
Document Information
Modified date:
17 October 2019
UID
swg21575164