实习期间,小组在用JAVA开发项目,用了不少先进东西。但在Windows和Linux下传东西却难倒了一帮人,同时本人的FTP(Win2003+ServU) 做了中转站,对于一个PIII800的机子,实在是为难。所以无聊之际,本人就用TELNET上服务器,配置了一下RH9下的VSFTPD,下面是简单的记录。
C:/>telnet 10.10.10.131 23
lRed Hat Linux release 9 (Shrike)
Kernel 2.4.20-8smp on an i686
login: globus
Password:
Last login: Tue Aug 2 20:59:29 from 10.10.10.169
[globus@np1 globus]$ su
Password:
[root@np1 globus]# cd /etc/vsftpd/vsftpd.conf
001 # Example config file /etc/vsftpd.conf
002 #
003 # The default compiled in settings are very paranoid. This sample file
004 # loosens things up a bit, to make the ftp daemon more usable.
005 #
006 # Allow anonymous FTP?
007 anonymous_enable=YES
008 #
009 # Uncomment this to allow local users to log in.
010 local_enable=YES
011 #
012 # Uncomment this to enable any form of FTP write command.
013 write_enable=YES
014 #
015 # Default umask for local users is 077. You may wish to change this to 022,
016 # if your users expect that (022 is used by most other ftpd's)
017 local_umask=077
anon_umask=077
018 #
019 # Uncomment this to allow the anonymous FTP user to upload files. This only
020 # has an effect if the above global write enable is activated. Also, you will
021 # obviously need to create a directory writable by the FTP user.
022 anon_upload_enable=YES
023 #
024 # Uncomment this if you want the anonymous FTP user to be able to create
025 # new directories.
026 anon_mkdir_write_enable=YES
027 #
028 # Activate directory messages - messages given to remote users when they
029 # go into a certain directory.
030 dirmessage_enable=YES
031 #
032 # Activate logging of uploads/downloads.
033 xferlog_enable=YES
034 #
035 # Make sure PORT transfer connections originate from port 20 (ftp-data).
036 connect_from_port_20=YES
037 #
038 # If you want, you can arrange for uploaded anonymous files to be owned by
039 # a different user. Note! Using "root" for uploaded files is not
040 # recommended!
041 #CHown_uploads=NO
042 #chown_username=whoever
043 #
044 # You may override where the log file goes if you like. The default is shown
045 # below.
046 #xferlog_file=/var/log/vsftpd.log
047 #
048 # If you want, you can have your log file in standard ftpd xferlog format
049 xferlog_std_format=YES
050 #
051 # You may change the default value for timing out an idle session.
052 #idle_session_timeout=600
053 #
054 # You may change the default value for timing out a data connection.
055 #data_connection_timeout=120
056 #
057 # It is recommended that you define on your system a unique user which the
058 # ftp server can use as a totally isolated and unprivileged user.
059 #nopriv_user=ftpsecure
060 #
061 # Enable this and the server will recognise asynchronous ABOR requests. Not
062 # recommended for security (the code is non-trivial). Not enabling it,
063 # however, may confuse older FTP clients.
064 #async_abor_enable=YES
065 #
066 # By default the server will pretend to allow ASCII mode but in fact ignore
067 # the request. Turn on the below options to have the server actually do ASCII
068 # mangling on files when in ASCII mode.
069 # Beware that turning on ascii_download_enable enables malicious remote parties
070 # to consume your I/O resources, by issuing the command "SIZE /big/file" in
071 # ASCII mode.
072 # These ASCII options are split into upload and download because you may wish
073 # to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
074 # without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
075 # on the client anyway..
076 ascii_upload_enable=YES
077 ascii_download_enable=YES
078 #
079 # You may fully customise the login banner string:
080 ftpd_banner=Welcome to blah FTP service.
081 #
082 # You may specify a file of disallowed anonymous e-mail addresses. Apparently
083 # useful for combatting certain DoS attacks.
084 #deny_email_enable=YES
085 # (default follows)
086 #banned_email_file=/etc/vsftpd.banned_emails
087 #
088 # You may specify an explicit list of local users to chroot() to their home
089 # directory. If chroot_local_user is YES, then this list becomes a list of
090 # users to NOT chroot().
091 #chroot_list_enable=YES
092 # (default follows)
093 #chroot_list_file=/etc/vsftpd.chroot_list
094 #
095 # You may activate the "-R" option to the builtin ls. This is disabled by
096 # default to avoid remote users being able to cause excessive I/O on large
097 # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
098 # the presence of the "-R" option, so there is a strong case for enabling it.
099 #ls_recurse_enable=YES
100
101 pam_service_name=vsftpd
102 userlist_enable=YES
103 #enable for standalone mode
104 listen=YES
105 tcp_wrappers=YES
这样设置完,远程可以匿名访问(anonymous),但无法下载,也无法上传,到/var/ftp下输入chmod 077 -R pub即可,就是递归更改文件和目录的权限。
好了,可以进行上传下载了,别的暂时忘了。