Master Linux File Sharing: SCP, FTP (vsftpd), rz/sz, and wget Explained
This guide walks through Linux file‑sharing methods—including SCP, FTP with vsftpd, the rz/sz utilities, and wget—covering installation, configuration, command syntax, permission handling, and practical tips for reliable cross‑system transfers.
Today we discuss Linux file sharing methods: SCP, FTP, rz/sz, and wget.
SCP
Common SCP usage is introduced, followed by typical command formats.
Examples:
scp 'local_file' user@remote_ip:/remote_folder scp -r 'local_folder' user@remote_ip:/remote_folderTo copy from remote to local, swap the source and destination parameters.
scp user@remote_ip:/remote_file /local_folder scp -r user@remote_ip:/remote_folder /local_folderFTP
Among many FTP server options, we focus on the widely used vsftpd.
vsftpd (very secure FTP daemon) can be installed via yum:
# yum -y install vsftpdStart the service and verify it is running:
# systemctl start vsftpd
# ps -aux | grep vsftpd
# netstat -antup | grep vsftpdThe main configuration file is /etc/vsftpd/vsftpd.conf. Example settings for anonymous access:
anonymous_enable=YES
local_enable=NO
anon_other_write_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_root=/var/www/htmlSet proper permissions on the shared directory:
chown -R ftp:ftp /var/ftp/pub/
chmod +w /var/ftp/pub/Restart the service and disable firewall and SELinux for testing:
# systemctl restart vsftpd
# systemctl stop firewalld && systemctl disable firewalld.service
# edit /etc/selinux/config to set SELINUX=disabled
# rebootAnonymous users can now access FTP; for system users, modify vsftpd.conf:
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_root=/var/www/htmlCreate a system user and set a password:
# useradd ftp_user
# echo "123456" | passwd --stdin ftp_userAfter restarting vsftpd, Windows clients can log in with the new credentials.
rz / sz
After installing the lrzsz package, rz uploads files from the local machine to the server, and sz downloads files from the server.
Install the utilities:
# yum -y install lrzszNote: rz and sz require a terminal that supports them (e.g., Xshell). Other terminals like PuTTY or MobaXterm may fail.
wget
wget is a non‑interactive network downloader supporting HTTP, HTTPS, and FTP, with proxy and resume capabilities.
Install wget: # yum -y install wget Basic usage and common options:
wget --help
wget -r // recursive download
wget -b // background download
wget -c // continue incomplete downloadExample: download the Linux version of QQ.
wget https://qd.myapp.com/myapp/qqteam/linux/QQ/linuxqq_2.0.0-b1-1024_x86_64.rpmAny download link can be fetched with wget, making it a versatile tool for retrieving files directly onto a server.
Next time we will explore NFS sharing and rsync for remote data synchronization.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
