Install and configure FTP server on an Ubuntu GCP VM
You can use the following steps to install and configure FTP server on an Ubuntu GCP VM:
- Install vsftpd:
sqlsudo apt-get update
sudo apt-get install vsftpd
- Configure vsftpd:
bashsudo nano /etc/vsftpd.conf
- Make the following changes in the configuration file:
makefilewrite_enable=YES local_umask=022 chroot_local_user=NO
- Create a new user for FTP access:
sudo adduser ftpuser
- Restart the vsftpd service:
sudo service vsftpd restart
- Allow incoming FTP traffic in the GCP firewall:
vbnetGo to the GCP Console.
Navigate to the VM instances page.
Click on the instance name to open its details page.
Click on the Edit button at the top of the page.
Navigate to the Networking section.
Click on the Edit button next to Firewall rules.
Click on the Create a new firewall rule button.
Enter a name for the firewall rule.
Set the Protocols and ports to "tcp:21".
Set the Targets to "All instances in the network".
Click on the Create button.
- Test FTP access:
cssftp <vm-instance-ip-address>
Use the username and password of the FTP user you created.
Comments
Post a Comment