In this article, I will guide you through the process of accessing and managing files on your Linux PC wirelessly using FTP (File Transfer Protocol). We will be utilizing vsftpd, a secure, lightweight, and powerful FTP CLI software, to set up an FTP server on your machine for easy access.
Setting Up vsftpd
-
Installation: Open your terminal and run the command
sudo apt install vsftpd
to install vsftpd on your Linux PC. -
Configuration: After the installation is complete, you will need to make changes to the vsftpd config file. Execute the following commands in your terminal:
sudo open /etc
- Locate
vsftpd.config
and open it with your preferred text editor.
-
Configuration Rules: Most of the configuration rules are disabled by default. To simplify the process, you can save the default config by appending it with the
.old
extension or clear everything and paste the following config rules:
* `listen=YES`
* `anonymous_enable=NO`
* `local_enable=YES`
* `write_enable=YES`
* `local_umask=022`
* `dirmessage_enable=YES`
* `use_localtime=YES`
* `xferlog_enable=YES`
* `connect_from_port_20=YES`
* `chroot_local_user=YES`
* `secure_chroot_dir=/var/run/vsftpd/empty`
* `pam_service_name=vsftpd`
* `allow_writeable_chroot=YES`
* `local_root=/home/your_username/`
- Activation: Save the configuration file and run the command
sudo systemctl restart vsftpd
to activate the vsftpd server.
Connecting to the FTP Server
- Network Setup: Connect your PC and the device you want to access your computer with to the same wireless network (Wi-Fi is recommended).
- Retrieve IP Address: Run the command
ifconfig
to obtain your inet IP address. - FTP Client Setup: Open your preferred FTP client and select "Add a new server." Input your IP address as the server address and your PC username and password in their respective input fields.
- Accessing Files: After inputting all the necessary information, click "OK" to access all the files located at the specified local directory in your vsftpd config file.
Shutting Down the vsftpd Server
To turn off your vsftpd server, simply open your terminal and run the command
`sudo service vsftpd stop`
. This will end all access to your PC via the vsftpd client.
That's all for today! Thank you for reading and watching. Make sure to like and subscribe for more amazing content coming soon.