- هذا الموضوع فارغ.
- Post
-
- ديسمبر 13, 2024 الساعة 10:30 ص
Weekend Wikiمدير عامTo enable FTP access on an Ubuntu machine, follow these steps:
Step 1: Install an FTP Server
- Open Terminal on your Ubuntu machine.
- Update the package list and install
vsftpd
(a lightweight FTP server):sudo apt update sudo apt install vsftpd -y
Step 2: Configure
vsftpd
- Open the FTP server configuration file:
sudo nano /etc/vsftpd.conf
- Edit the file to configure the FTP server:
- Allow local users to log in: Uncomment the line:
local_enable=YES
- Enable write access: Uncomment the line:
write_enable=YES
- Disable anonymous FTP access: Ensure this line is set:
anonymous_enable=NO
- Enable FTP access to a specific directory (optional): Add the following line to restrict FTP users to their home directories:
chroot_local_user=YES
- Allow local users to log in: Uncomment the line:
- Save the changes (press
Ctrl+O
, thenEnter
, followed byCtrl+X
). - Restart the FTP server to apply the changes:
sudo systemctl restart vsftpd
Step 3: Configure Firewall (if applicable)
- If the firewall is active (
ufw
), allow FTP traffic:sudo ufw allow 21 sudo ufw enable
- Verify the rules:
sudo ufw status
Step 4: Create an FTP User (if needed)
- Add a new user:
sudo adduser ftpuser
- Set a password for the user during the prompt.
Step 5: Access FTP
- Use an FTP client like FileZilla, WinSCP, or a command-line FTP client to connect.
- Connection details for the client:
- Host: The IP address of your Ubuntu machine.
- Username: The FTP user’s username (e.g.,
ftpuser
). - Password: The password you set.
- Port: 21 (default FTP port).
Optional: Enable Secure FTP (FTPS)
For encrypted connections, enable FTPS:
- Open the configuration file:
sudo nano /etc/vsftpd.conf
- Uncomment or add the following lines to enable SSL:
ssl_enable=YES rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
- Restart the FTP server:
sudo systemctl restart vsftpd
Now your FTP server is ready for use!
If still you’re not able to do so, connect with us at [email protected]
- يجب تسجيل الدخول للرد على هذا الموضوع.