To change the password for the FTP server on CentOS 7
To change the password for the FTP server on CentOS 7, you can follow these steps:
1. Connect to your CentOS 7 server via SSH using a terminal or PuTTY if you are on a Windows system.
2. Once connected, log in as the root user or any user with sudo privileges.
3. Open the FTP server configuration file using a text editor. The default FTP server on CentOS 7 is usually vsftpd, so you can use the following command to edit its configuration file:
``` sudo nano /etc/vsftpd/vsftpd.conf ```
4. Inside the configuration file, find the line that starts with `#passwd_chroot_enable` and remove the `#` symbol to uncomment the line.
5. Set the value of `passwd_chroot_enable` to `YES` to ensure that the users' home directories are properly chrooted. The line should look like this:
``` passwd_chroot_enable=YES ```
6. Save the changes and exit the text editor.
7. Restart the FTP server to apply the new configuration:
``` sudo systemctl restart vsftpd ```
8. Now you can change the password for the desired user. You can use the following command to change the password for a user named "username":
``` sudo passwd username ``` You will be prompted to enter and confirm the new password.
9. Once you've changed the password, you can test the FTP server by connecting with the updated credentials using an FTP client.
Please note that it's important to follow best practices for securing your server and using strong, unique passwords for each user account.