Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Setup FTP server Linux

Step 1: Installing VSFTPD in Linux
You can quickly install VSFTPD on your Fedora/Red Hat/SUSE servers through the command line interface with:

dnf -y install vsftpd
If you are using Ubuntu/Debian-based distributions, you can install VSFTPD using this command:

sudo apt-get install vsftpd
If you are using Arch-based distributions, try this command for installing VSFTPD.

sudo pacman -S vsftpd
Step 2: Configuring FTP server
Most VSFTPD’s configuration takes place in /etc/vsftpd.conf. The file itself is well-documented, so this section only highlights some important changes you may want to make. For all available options and basic documentation see the man pages:

man vsftpd.conf
Files are served by default from /srv/ftp as per the Filesystem Hierarchy Standard.

Enable Uploading to the FTP server:
The “write_enable” flag must be set to YES in order to allow changes to the filesystem, such as uploading:

write_enable=YES
Allow Local Users to Login:
In order to allow users in /etc/passwd to login, the “local_enable” directive must look like this:

local_enable=YES
Anonymous Login
The following lines control whether anonymous users can login:

# Allow anonymous login
anonymous_enable=YES
# No password is required for an anonymous login (Optional)
no_anon_password=YES
# Maximum transfer rate for an anonymous client in Bytes/second (Optional)
anon_max_rate=30000
# Directory to be used for an anonymous login (Optional)
anon_root=/example/directory/

Chroot Jail
It is possible to set up a chroot environment, which prevents the user from leaving his home directory. To enable this, add/change the following lines in the configuration file:

chroot_list_enable=YES 
chroot_list_file=/etc/vsftpd.chroot_list
The “chroot_list_file” variable specifies the file in which the jailed users are contained to.

Step 4: Restart your FTP server
In the end  you must restart your ftp server. Type in your command line

sudo systemctl restart vsftpd
That’s it. Your FTP server on Linux is up and running. FTP is increasingly being replaced by FTP over SSH protocol so you may want to setup SFTP server on Linux.
Comment

PREVIOUS NEXT
Code Example
Shell :: best linux vpn server 
Shell :: install appx 
Shell :: asyncstorage community 
Shell :: appimage install kali linux 
Shell :: install brew max 
Shell :: brew.sh 
Shell :: ubuntu use pip as pip3 
Shell :: ubuntu all installed services 
Shell :: how to use termianl on mac to go back one directory 
Shell :: brave install in linux 
Shell :: change ubuntu username 
Shell :: check network card name linux 
Shell :: ngrok command 80 not found 
Shell :: install windows app powershell 
Shell :: how to activate virtual environment in ubuntu 20.04 
Shell :: bash input 
Shell :: kubectl live logs 
Shell :: bash remove first character from string 
Shell :: how to reset source list ubuntu 
Shell :: github push an existing repository from the command line 
Shell :: logrotate force rotation 
Shell :: react navigation react native 
Shell :: copy folder from ssh to local 
Shell :: record audio with ffmpeg 
Shell :: powershell create service 
Shell :: google font npm install 
Shell :: could not find tools.jar linux 
Shell :: main git commands 
Shell :: grep exclude 
Shell :: linux create executable 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =