- Back to Home »
- Linux PC »
- FTP server
Saturday, May 23, 2015
1. Install FTP server
yum install -y vsftpd
yum install -y ftp
setsebool -P ftp_home_dir on
setsebool -P ftpd_full_access 1
yum install geany
2. Setup
OPTION-1 (for current user):
Open and edit:
geany /etc/vsftpd/vsftpd.conf
Edit:
+ anonymous_enable=NO
+ ascii_upload_enable=YES
+ ascii_download_enable=YES
+ ftpd_banner=Welcome to CENTIC FTP service.
Add this file at the end of file:
+ use_localtime=YES
OPTION-2 (for share user):
geany /etc/vsftpd/vsftpd.conf
# line 12: no anonymous
anonymous_enable=NO
# line 82,83: uncomment ( allow ascii mode )
ascii_upload_enable=YES
ascii_download_enable=YES
# line 100, 101: uncomment ( enable chroot )
chroot_local_user=YES
chroot_list_enable=YES
# line 103: uncomment ( specify chroot list )
chroot_list_file=/etc/vsftpd/chroot_list
# line 109: uncomment
ls_recurse_enable=YES
# line 114: change ( if use IPv4 )
listen=YES
# line 123: change ( if use IPv4, IPv6 is off )
listen_ipv6=NO
# add at the last line
# specify root directory ( if don't specify, users' home directory become FTP home directory)
local_root=public_html
# use localtime
use_localtime=YES
# turn off for seccomp filter ( if you cannot login, add this line )
seccomp_sandbox=NO
geany /etc/vsftpd/chroot_list
# add users you allow to move over their home directory (useradd share, passwd share)
share
3 Run FTP server
stop firewall:
systemctl stop firewalld.service
service vsftpd start (start FTP server - service vsftpd restart)
chkconfig vsftpd on (start FTP server on startup)
On another computer:
open FTP client such as gftp or filezilla
Login: ip address, username and pass for this username