Hello every one there,
I m new here in, and have some problem in configuring FTP server in RedHat 5, so can any body help me please!!!

Regards!
A.M Linux

Dani AI

Generated

This thread began with asking about FTP on Red Hat 5. Early replies rightly pointed to installing an FTP daemon and using chroot to limit users, and flagged that RHEL5 is very old. Important context: RHEL 5 is retired (product retirement: March 31, 2017; Extended Life Support ended Nov 30, 2020) — running exposed services on it is risky; upgrade or isolate the host where possible. (Red Hat life‑cycle info: https://access.redhat.com/articles/4038291).

Rather than exposing plain FTP, consider using OpenSSH’s SFTP subsystem and chrooting matched users. Minimal example to add near the end of /etc/ssh/sshd_config:

Subsystem sftp internal-sftp

Match Group sftponly
    ChrootDirectory /sftp/%u
    ForceCommand internal-sftp -d /upload
    AllowTcpForwarding no
    X11Forwarding no

Notes: every component of the ChrootDirectory path must be owned by root and not writable by others; create a writable subdirectory (for example /sftp/username/upload) owned by the user or use a bind mount if you cannot change ownership. Put the Match block at the end of sshd_config and test carefully. See the sshd_config/chroot rules and internal-sftp options for details. (OpenSSH manual: https://man.openbsd.org/sshd_config; chroot/use of -d: https://discourse.ubuntu.com/t/chroot-sftp-users-to-home-directory/53249).

If you must run legacy FTP, harden it: enforce TLS (FTPS), restrict and advertise a small passive port range in vsftpd.conf, open those ports in the host firewall, and set the appropriate SELinux boolean (older RHEL used ftp_home_dir, newer systems may use ftpd_full_access). Also chroot FTP users or use virtual accounts and monitor FTP logs (/var/log/secure or vsftpd logs). See Red Hat docs on FTP/SELinux and passive-mode configuration for examples. (Red Hat FTP/SELinux notes: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/6/html/managing_confined_services/chap-managing_confined_services-file_transfer_protocol).

Practical caution: when changing sshd or FTP configs, keep a fallback console or second session so you cannot lock yourself out.

Recommended Answers

All 6 Replies

What are you trying to accomplish? The reason I am asking is that
1. in many cases there are better ways to transfer files
2. RedHat 5 is very old

u must install vsftpd package first.
yum install vsftpd
service vsftpd restart
chkconfig vsftpd on

it is a default configuration of ftp.
ftp is not so secure.

FTP still has it's uses.

If you are going to do this, I suggest chroot-ing the users into their home directories to limit their access along with making sure the ftp logins do not match the system logins.

Thank Dear CimmerianX, rahul pareek, DoRight,
but what is the alternative for FTP, can anyone give little details

It depends on the situation. But some good alternatives to lookat:
SFTP
FTPS
SCP

Thanks CimmerianX for ur support

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.