Home
Cloud
Big Data
CI
Install
Samples
Java
Ubuntu
Maven
Archive
Install
|
vsftpd (FTP server)
References
Installation
Create an ftp administrator user
/etc/vsftpd.conf
Connecting to the server
/etc/pam.d/vsftpd
References
See this page for more details on how to install vsftpd:
https://help.ubuntu.com/community/vsftpd
Installation
Run the following command to install vsftpd:
$ sudo apt install vsftpd
Notes:
The user '
ftp
' and the group '
ftp
' will be created.
Also, the folder '
/srv/ftp/
' will be created.
Create an ftp administrator user
Create an ftp administrator user:
$ sudo useradd admin1 $ sudo passwd admin1
$ sudo usermod --home /srv/ftp/ admin1 $ sudo usermod -s /sbin/nologin admin1
$ sudo usermod -a -G ftp admin1
$ sudo chmod 775 /srv/ftp
/etc/vsftpd.conf
Modify the following settings in the file '
/etc/vsftpd.conf
' to enable write permissions:
$ sudo vi /etc/vsftpd.conf
write_enable=YES local_umask=022
To allow just some users to login to the server, add the following settings in the file '
/etc/vsftpd.conf
':
$ sudo vi /etc/vsftpd.conf
userlist_deny=NO userlist_enable=YES userlist_file=/etc/vsftpd.allowed_users
Create the file '/etc/vsftpd.allowed_users' and add the username of the users that can login to the server:
$ sudo vi /etc/vsftpd.allowed_users
admin1
Connecting to the server
Use FTP to connect to the server:
$ ftp localhost
You need to type your username and password:
Connected to localhost. 220 (vsFTPd 3.0.3) Name (localhost:mtitek): admin1 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp>
ftp> pwd Remote directory: /srv/ftp
/etc/pam.d/vsftpd
You might get an authentication error when trying to connect to the server.
$ ftp localhost
Connected to localhost. 220 (vsFTPd 3.0.3) Name (localhost:mtitek): admin1 331 Please specify the password. Password: 530 Login incorrect. Login failed. ftp>
If so, comment the following settings in the file '
/etc/pam.d/vsftpd
':
$ sudo vi /etc/pam.d/vsftpd
#auth required pam_shells.so
© 2010-2022
mti
tek