0% found this document useful (0 votes)
5 views5 pages

FTP

The document outlines the process of installing and configuring the vsftpd FTP server on an Ubuntu system. It includes commands for updating packages, installing vsftpd, creating a user, and troubleshooting connection issues. Ultimately, the configuration is successful, allowing the user 'ftpuser' to log in and transfer files via FTP.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

FTP

The document outlines the process of installing and configuring the vsftpd FTP server on an Ubuntu system. It includes commands for updating packages, installing vsftpd, creating a user, and troubleshooting connection issues. Ultimately, the configuration is successful, allowing the user 'ftpuser' to log in and transfer files via FTP.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

nllab20@nllab-20:~/Desktop/33221$ sudo apt-get update

[sudo] password for nllab20:


Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:4 https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 InRelease
Hit:5 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:6 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists... Done
nllab20@nllab-20:~/Desktop/33221$ sudo apt-get install vsftpd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
vsftpd is already the newest version (3.0.5-0ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
nllab20@nllab-20:~/Desktop/33221$ sudo systemctl start vsftpd
nllab20@nllab-20:~/Desktop/33221$ sudo systemctl enable vsftpd
Synchronizing state of vsftpd.service with SysV service script with
/lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable vsftpd
nllab20@nllab-20:~/Desktop/33221$ sudo nano /etc/vsftpd.conf
nllab20@nllab-20:~/Desktop/33221$ ^[[200~sudo systemctl restart vsftpd
sudo: command not found
nllab20@nllab-20:~/Desktop/33221$ sudo systemctl restart vsftpd
nllab20@nllab-20:~/Desktop/33221$ sudo adduser ftpuser
Adding user `ftpuser' ...
Adding new group `ftpuser' (1001) ...
Adding new user `ftpuser' (1001) with group `ftpuser' ...
Creating home directory `/home/ftpuser' ...
Copying files from `/etc/skel' ...
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
Sorry, passwords do not match.
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for ftpuser
Enter the new value, or press ENTER for the default
​ Full Name []: Shreeya
​ Room Number []: A3-303
​ Work Phone []: 123456789
​ Home Phone []: 789456123
​ Other []: 456123789
Is the information correct? [Y/n] Y
nllab20@nllab-20:~/Desktop/33221$ sudo chown ftpuser:Shreeya /home/ftpuser
chown: invalid group: ‘ftpuser:Shreeya
nllab20@nllab-20:~/Desktop/33221$ sudo chown ftpuser:ftpuser /home/ftpuser
nllab20@nllab-20:~/Desktop/33221$ sudo chmod 750 /home/ftpuser
nllab20@nllab-20:~/Desktop/33221$ ftp localhost
ftp: Can't connect to `127.0.0.1:21': Connection refused
ftp: Can't connect to `localhost:ftp'
ftp>
ftp> exit
nllab20@nllab-20:~/Desktop/33221$ sudo systemctl status vsftpd
× vsftpd.service - vsftpd FTP server
Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset>
Active: failed (Result: exit-code) since Thu 2025-02-20 12:15:10 IST; 3min>
Process: 7707 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited>
Process: 7709 ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf (code=exited, sta>
Main PID: 7709 (code=exited, status=2)
CPU: 4ms

Feb 20 12:15:10 nllab-20 systemd[1]: Starting vsftpd FTP server...


Feb 20 12:15:10 nllab-20 systemd[1]: Started vsftpd FTP server.
Feb 20 12:15:10 nllab-20 systemd[1]: vsftpd.service: Main process exited, code=>
Feb 20 12:15:10 nllab-20 systemd[1]: vsftpd.service: Failed with result 'exit-c>
lines 1-12/12 (END)
nllab20@nllab-20:~/Desktop/33221$ sudo systemctl restart vsftpd
nllab20@nllab-20:~/Desktop/33221$ sudo systemctl status vsftpd
× vsftpd.service - vsftpd FTP server
Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset>
Active: failed (Result: exit-code) since Thu 2025-02-20 12:18:56 IST; 1s a>
Process: 7780 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited>
Process: 7781 ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf (code=exited, sta>
Main PID: 7781 (code=exited, status=2)
CPU: 4ms

Feb 20 12:18:56 nllab-20 systemd[1]: Starting vsftpd FTP server...


Feb 20 12:18:56 nllab-20 systemd[1]: Started vsftpd FTP server.
Feb 20 12:18:56 nllab-20 systemd[1]: vsftpd.service: Main process exited, code=>
Feb 20 12:18:56 nllab-20 systemd[1]: vsftpd.service: Failed with result 'exit-c>

nllab20@nllab-20:~/Desktop/33221$ sudo vsftpd /etc/vsftpd.conf


500 OOPS: run two copies of vsftpd for IPv4 and IPv6
nllab20@nllab-20:~/Desktop/33221$ sudo vsftpd /etc/vsftpd.conf
500 OOPS: run two copies of vsftpd for IPv4 and IPv6
nllab20@nllab-20:~/Desktop/33221$ sudo nano /etc/vsftpd.conf
nllab20@nllab-20:~/Desktop/33221$ sudo systemctl restart vsftpd
nllab20@nllab-20:~/Desktop/33221$ sudo systemctl status vsftpd
● vsftpd.service - vsftpd FTP server
Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset>
Active: active (running) since Thu 2025-02-20 12:20:48 IST; 2s ago
Process: 7818 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited>
Main PID: 7819 (vsftpd)
Tasks: 1 (limit: 9174)
Memory: 864.0K
CPU: 4ms
CGroup: /system.slice/vsftpd.service
└─7819 /usr/sbin/vsftpd /etc/vsftpd.conf
Feb 20 12:20:48 nllab-20 systemd[1]: Starting vsftpd FTP server...
Feb 20 12:20:48 nllab-20 systemd[1]: Started vsftpd FTP server.

nllab20@nllab-20:~/Desktop/33221$ ftp localhost


Connected to localhost.
220 (vsFTPd 3.0.5)
Name (localhost:nllab20): Shreeya
530 Permission denied.
ftp: Login failed
ftp>
ftp> exit
221 Goodbye.
nllab20@nllab-20:~/Desktop/33221$ ftp localhost
Connected to localhost.
220 (vsFTPd 3.0.5)
Name (localhost:nllab20): ftpuser
530 Permission denied.
ftp: Login failed
ftp> exit
221 Goodbye.
nllab20@nllab-20:~/Desktop/33221$ cat /etc/passwd | grep ftpuser
ftpuser:x:1001:1001:Shreeya,,,:/home/ftpuser:/bin/bash
nllab20@nllab-20:~/Desktop/33221$ cat /etc/ftpusers
# /etc/ftpusers: list of users disallowed FTP access. See ftpusers(5).

root
daemon
bin
sys
sync
games
man
lp
mail
news
uucp
nobody
nllab20@nllab-20:~/Desktop/33221$ cat /etc/vsftpd/user_list
cat: /etc/vsftpd/user_list: No such file or directory
nllab20@nllab-20:~/Desktop/33221$ ftp localhost
Connected to localhost.
220 (vsFTPd 3.0.5)
Name (localhost:nllab20): anonymous
530 Permission denied.
ftp: Login failed
ftp> exit
421 Timeout.
nllab20@nllab-20:~/Desktop/33221$ sudo nano /etc/vsftpd.conf
[sudo] password for nllab20:
nllab20@nllab-20:~/Desktop/33221$ cat /etc/vsftpd/user_list
cat: /etc/vsftpd/user_list: No such file or directory
nllab20@nllab-20:~/Desktop/33221$ echo "ftpuser" | sudo tee -a /etc/vsftpd.user_list
ftpuse
nllab20@nllab-20:~/Desktop/33221$ sudo systemctl restart vsftpd
nllab20@nllab-20:~/Desktop/33221$ sudo systemctl status vsftpd
● vsftpd.service - vsftpd FTP server
Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset>
Active: active (running) since Thu 2025-02-20 12:47:18 IST; 12s ago
Process: 8479 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited>
Main PID: 8480 (vsftpd)
Tasks: 1 (limit: 9174)
Memory: 860.0K
CPU: 4ms
CGroup: /system.slice/vsftpd.service
└─8480 /usr/sbin/vsftpd /etc/vsftpd.conf

Feb 20 12:47:18 nllab-20 systemd[1]: Starting vsftpd FTP server...


Feb 20 12:47:18 nllab-20 systemd[1]: Started vsftpd FTP server.

nllab20@nllab-20:~/Desktop/33221$ ftp localhost


Connected to localhost.
220 (vsFTPd 3.0.5)
Name (localhost:nllab20): ftpuser
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/ftpuser/ftp
ftp: Login failed
ftp> exit
nllab20@nllab-20:~/Desktop/33221$ ls -ld /home/ftpuser
drwxr-x--- 2 ftpuser ftpuser 4096 Feb 20 12:15 /home/ftpuser
nllab20@nllab-20:~/Desktop/33221$ sudo mkdir -p /home/ftpuser/ftp
nllab20@nllab-20:~/Desktop/33221$ sudo chown ftpuser:ftpuser /home/ftpuser/ftp
nllab20@nllab-20:~/Desktop/33221$ sudo chmod 750 /home/ftpuser/ftp
nllab20@nllab-20:~/Desktop/33221$ sudo nano /etc/vsftpd.conf
nllab20@nllab-20:~/Desktop/33221$ sudo systemctl restart vsftpd
nllab20@nllab-20:~/Desktop/33221$ sudo systemctl status vsftpd
● vsftpd.service - vsftpd FTP server
Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset>
Active: active (running) since Thu 2025-02-20 12:51:06 IST; 2s ago
Process: 8534 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited>
Main PID: 8535 (vsftpd)
Tasks: 1 (limit: 9174)
Memory: 860.0K
CPU: 4ms
CGroup: /system.slice/vsftpd.service
└─8535 /usr/sbin/vsftpd /etc/vsftpd.conf

Feb 20 12:51:06 nllab-20 systemd[1]: Starting vsftpd FTP server...


Feb 20 12:51:06 nllab-20 systemd[1]: Started vsftpd FTP server.
nllab20@nllab-20:~/Desktop/33221$ ftp localhost
Connected to localhost.
220 (vsFTPd 3.0.5)
Name (localhost:nllab20): ftpuser
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

You might also like