Linux VSFtpd
!
!
!
Do the same for the following variables :
!
!
!
nano /etc/vsftpd.chroot_list
!
The user must already be a system user with a valid passwd.
You must be able to find /home/, If the user you want to add is not a system user then create
that user first before editing the above file.
!
This will populate user in the /etc/passwd file :
ftpuser:x:1001:1001:::/home/salman:/bin/bash
!
What we want to do here is point the user “ftpuser” to ftp home directory like this below :
ftpuser:x:1001:1001::/media/Multimedia/Multimedia:/bin/bash
!
!
Now you can log into ftp using the new user.
EG : vsftpd.conf :
ftpd_banner: Prints a welcome message when someone connects to the server.
listen: If enabled, vsftpd will run in standalone mode.
xferlog_enable: If enabled, a log file will store detailed uploads and downloads.
xferlog_file=/var/log/vsftpd.log: You may override where the log file goes if you like. The default is shown.
xferlog_std_format=YES: Log file in standard ftpd xferlog format. Note that the default log file location is /var/log/xferlog in this case.
connect_from_port_20: Controls PORT data connections use port 20 on the server machine.
idle_session_timeout=600: You may change the default value for timing out an idle session.
data_connection_timeout=120: You may change the default value for timing out a data connection.
hide_ids: If enabled, all user and group information in directory listings will be displayed as “ftp”.
max_client: Sets the maximum number of clients allowed to be connected.
max_per_ip: Sets the maximum number of clients allowed to be connected from the same IP address.
max_login_fails: After this many login failures, the session is killed.
anon_root: Sets the directory which vsftpd will try to change into when an anonymous user logs in.
anonymous_enable: Enables or disables anonymous access. Use with caution.
anon_upload_enable: If enabled, anonymous users will be permitted to upload files.
anon_mkdir_write_enable: If enabled, anonymous users will be permitted to create new folders.
However, for this option to work, your server needs to have the option anonymous upload enabled and
the ftp *NIX user must write permissions on the parent directory.
nano /etc/vsftpd.conf :
listen=YES
listen_port=21
anonymous_enable=No
local_enable=YES
write_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=120
ftpd_banner=Welcome to Comms-Networks FTP service.
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
pasv_enable=YES
pasv_promiscuous=YES
pasv_min_port=40000
pasv_max_port=40010
pasv_address=192.168.2.4
hide_ids=YES
max_clients=4
max_per_ip=2
max_login_fails=3
local_max_rate=128000