VSFTP in Linux
VSFTP in Linux
Introduction to FTP
The File Transfer Protocol (FTP) is used as one of the most common means of copying files between servers over the Internet. Regular FTP
The VSFTP allows Linux users to copy files to and from their home directories with an FTP client. Anonymous FTP a username of anonymous and your email address for the password. Once logged in to a FTP server, you automatically have access to only the default anonymous FTP directory
Anonymous FTP
Start VSFTP
Use the chkconfig command to configure VSFTP to start at boot:
chkconfig vsftpd on
cp vsftpd.conf vsftpd.conf.bak Allow Anonymous Allow Anonymous upload Allow Anonymous upload to create directory
anonymous_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_max_rate=30000
Limit the transfer rate of anonymous, e.g. 30000 = 30k byte per second
Directory for anonymous is /var/ftp
anon_root=/data/directory
chroot_list_enable=YES
VSFTPD will use a file to limit some users to change their home directories after login
chroot_list_file=/etc/vsftpd/chroot_list
A text file which contain a list of Linux usernames. These users will limit to their home directories
userlist_file=/etc/vsftpd/user_list
A text file which contain a list of Linux usernames which DO NOT allow to use VSFTP.
Limit the transfer rate of local user, e.g. 30000 = 30k byte per second
local_max_rate=30000
Other Settings
max_clients=10
max_per_ip=1
idle_session_timeout=600
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log
tcp_wrappers = yes
If you want to allow a specific host, create a hosts.allow with same format.
Introduction of Samba
Samba is a server that allows your Linux to share files with Windows. Samba can make your Linux into a Windows Primary Domain Controller (PDC) or a server for a Windows Workgroup. Samba can make users to access their Linux home directory with Windows.
Start Samba
Use the chkconfig command to configure Samba to start at boot:
chkconfig smb on
cp smb.conf smb.conf.bak
Swat, Samba's web based configuration tool enables you configure your smb.conf file without you needing to remember all the formatting. Configuration file of swat: /etc/xinetd.d/swat
Configure Swat
To limit the use of swat, add only_from service swat statement to swat configuration file. {
port socket_type protocol wait user server log_on_failure disable only_from } = 901 = stream = tcp = no = root = /usr/sbin/swat += USERID = no = localhost 192.168.1.3
[global] section
workgroup = tyict
Important! View Chinese filename in Windows. Log filename and location. File size of log file, 500 = 500Kb
User level security (request username and password), strongly recommended. Protect your password Filename and location of password file
[homes] section
read only = No
Allows the samba user to also write to their Samba Linux directory.
browseable = No
[MyShare] section
You can create a new section to share a folder in Linux. [MyShare] Sample configuration: path = /share/pub
read only = public = writable = create mode directory mode no yes yes = 0664 = 0775
public = yes
Samba Users
A Linux user cannot directly use Sambas share folders. We need to convert a Linux user to a Samba user:
smbpasswd -d username
smbpasswd -e username
smbpasswd -x username
http service
Open the Start Menu and go to Programs > Administrative Tools > Internet Services Manager. Once the IIS page opens, find the name of the computer and click the plus (+) sign next to it. This will display the FTP, HTTP, and SMTP Virtual Server icons. Click on the Default Web Site icon to
Summary/ Conclusion
Detailed Summary or Conclusion about Data Communication
AIM&IT
AIM&IT