- - PR -
vsftpdでのFTPサイトが限定されて見れない
投稿者 | 投稿内容 | ||||
---|---|---|---|---|---|
|
投稿日時: 2005-08-17 12:20
こんにちは。
CentOS4.1とvsftpdによりFTPを公開しているのですが、 なぜか見れる見れないといった現象が発生しています。 現象ですが、自宅(ローカル)ではIE上でIDとパスを入力して、 問題なく入れて見れるのですが、 会社ではIEで同様にIDとパスを求められて、入力後に、 "FTPサーバのフォルダを開こうとしてエラーが発生しました。 このフォルダへのアクセスが許可されているかどうかを確認してください。 詳細 処理がタイムアウトになりました" となります。 パーミッションときたので、 アクセスしているユーザのパーミッションを仮に777にしても駄目でした。 自宅、会社ともに クライアントのOSはWinXPです。 ブラウザはIEでバージョンは6になります。 ここまでだったら、 会社のネットワーク環境など疑うのですが、 同じ会社のPCでコマンドプロンプトで入ると入れるのです。 FFFTPも同じくOKでした。 さらにブラウザからrikenなどのFTPに入ることができるので、 とくにブラウザの設定にまずいところもないと思われます。 1番最後にエラーを出した状態の最後からコピーしたログと、 vsftpd.confを添付します。。 おかしいところなどありましたら、ご指摘頂ければ幸いです。 かなり長くて申し訳ありません。 *********LOG************ Wed Aug 17 12:12:52 2005 [pid 16253] [anonymous] FAIL LOGIN: Client "61.127.127.162" Wed Aug 17 03:12:52 2005 [pid 16254] [anonymous] FTP response: Client "61.127.127.162", "530 Login incorrect." Wed Aug 17 12:12:56 2005 [pid 16256] CONNECT: Client "61.127.127.162" Wed Aug 17 03:12:56 2005 [pid 16256] FTP response: Client "61.127.127.162", "220 unknown" Wed Aug 17 03:12:56 2005 [pid 16256] FTP command: Client "61.127.127.162", "USER soft" Wed Aug 17 03:12:56 2005 [pid 16256] [soft] FTP response: Client "61.127.127.162", "331 Please specify the password." Wed Aug 17 03:12:56 2005 [pid 16256] [soft] FTP command: Client "61.127.127.162", "PASS <password>" Wed Aug 17 12:12:56 2005 [pid 16255] [soft] OK LOGIN: Client "61.127.127.162" Wed Aug 17 12:12:56 2005 [pid 16257] [soft] FTP response: Client "61.127.127.162", "230 Login successful." Wed Aug 17 03:12:56 2005 [pid 16257] [soft] FTP command: Client "61.127.127.162", "OPTS utf8 on" Wed Aug 17 03:12:56 2005 [pid 16257] [soft] FTP response: Client "61.127.127.162", "501 Option not understood." Wed Aug 17 03:12:56 2005 [pid 16257] [soft] FTP command: Client "61.127.127.162", "SYST" Wed Aug 17 03:12:56 2005 [pid 16257] [soft] FTP response: Client "61.127.127.162", "215 UNIX Type: L8" Wed Aug 17 03:12:56 2005 [pid 16257] [soft] FTP command: Client "61.127.127.162", "SITE help" Wed Aug 17 03:12:56 2005 [pid 16257] [soft] FTP response: Client "61.127.127.162", "214 CHMOD UMASK HELP" Wed Aug 17 03:12:56 2005 [pid 16257] [soft] FTP command: Client "61.127.127.162", "PWD" Wed Aug 17 03:12:56 2005 [pid 16257] [soft] FTP response: Client "61.127.127.162", "257 "/"" Wed Aug 17 12:12:56 2005 [pid 16259] CONNECT: Client "61.127.127.162" Wed Aug 17 03:12:56 2005 [pid 16259] FTP response: Client "61.127.127.162", "220 unknown" Wed Aug 17 03:12:56 2005 [pid 16259] FTP command: Client "61.127.127.162", "USER soft" Wed Aug 17 03:12:56 2005 [pid 16259] [soft] FTP response: Client "61.127.127.162", "331 Please specify the password." Wed Aug 17 03:12:56 2005 [pid 16259] [soft] FTP command: Client "61.127.127.162", "PASS <password>" Wed Aug 17 12:12:56 2005 [pid 16258] [soft] OK LOGIN: Client "61.127.127.162" Wed Aug 17 12:12:56 2005 [pid 16260] [soft] FTP response: Client "61.127.127.162", "230 Login successful." Wed Aug 17 03:12:57 2005 [pid 16260] [soft] FTP command: Client "61.127.127.162", "OPTS utf8 on" Wed Aug 17 03:12:57 2005 [pid 16260] [soft] FTP response: Client "61.127.127.162", "501 Option not understood." Wed Aug 17 03:12:57 2005 [pid 16260] [soft] FTP command: Client "61.127.127.162", "SYST" Wed Aug 17 03:12:57 2005 [pid 16260] [soft] FTP response: Client "61.127.127.162", "215 UNIX Type: L8" Wed Aug 17 03:12:57 2005 [pid 16260] [soft] FTP command: Client "61.127.127.162", "SITE help" Wed Aug 17 03:12:57 2005 [pid 16260] [soft] FTP response: Client "61.127.127.162", "214 CHMOD UMASK HELP" Wed Aug 17 03:12:57 2005 [pid 16260] [soft] FTP command: Client "61.127.127.162", "PWD" Wed Aug 17 03:12:57 2005 [pid 16260] [soft] FTP response: Client "61.127.127.162", "257 "/"" Wed Aug 17 03:12:57 2005 [pid 16260] [soft] FTP command: Client "61.127.127.162", "TYPE A" Wed Aug 17 03:12:57 2005 [pid 16260] [soft] FTP response: Client "61.127.127.162", "200 Switching to ASCII mode." Wed Aug 17 03:12:57 2005 [pid 16260] [soft] FTP command: Client "61.127.127.162", "PASV" Wed Aug 17 03:12:57 2005 [pid 16260] [soft] FTP response: Client "61.127.127.162", "227 Entering Passive Mode (192,168,10,10,31,148)" *********LOG END*********** ********ConfFile************* # Example config file /etc/vsftpd/vsftpd.conf # # The default compiled in settings are fairly paranoid. This sample file # loosens things up a bit, to make the ftp daemon more usable. # Please see vsftpd.conf.5 for all compiled in defaults. # # READ THIS: This example file is NOT an exhaustive list of vsftpd options. # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's # capabilities. # # Allow anonymous FTP? (Beware - allowed by default if you comment this out). anonymous_enable=NO # # Uncomment this to allow local users to log in. local_enable=YES # # Uncomment this to enable any form of FTP write command. write_enable=YES # # Default umask for local users is 077. You may wish to change this to 022, # if your users expect that (022 is used by most other ftpd's) local_umask=022 # # Uncomment this to allow the anonymous FTP user to upload files. This only # has an effect if the above global write enable is activated. Also, you will # obviously need to create a directory writable by the FTP user. #anon_upload_enable=YES # # Uncomment this if you want the anonymous FTP user to be able to create # new directories. #anon_mkdir_write_enable=YES # # Activate directory messages - messages given to remote users when they # go into a certain directory. dirmessage_enable=YES # # Activate logging of uploads/downloads. xferlog_enable=YES # # Make sure PORT transfer connections originate from port 20 (ftp-data). connect_from_port_20=YES # # If you want, you can arrange for uploaded anonymous files to be owned by # a different user. Note! Using "root" for uploaded files is not # recommended! #chown_uploads=YES #chown_username=whoever # # You may override where the log file goes if you like. The default is shown # below. #xferlog_file=/var/log/vsftpd.log # # If you want, you can have your log file in standard ftpd xferlog format xferlog_std_format=YES # # You may change the default value for timing out an idle session. #idle_session_timeout=600 # # You may change the default value for timing out a data connection. #data_connection_timeout=120 # # It is recommended that you define on your system a unique user which the # ftp server can use as a totally isolated and unprivileged user. #nopriv_user=ftpsecure # # Enable this and the server will recognise asynchronous ABOR requests. Not # recommended for security (the code is non-trivial). Not enabling it, # however, may confuse older FTP clients. #async_abor_enable=YES # # By default the server will pretend to allow ASCII mode but in fact ignore # the request. Turn on the below options to have the server actually do ASCII # mangling on files when in ASCII mode. # Beware that turning on ascii_download_enable enables malicious remote parties # to consume your I/O resources, by issuing the command "SIZE /big/file" in # ASCII mode. # These ASCII options are split into upload and download because you may wish # to enable ASCII uploads (to prevent uploaded scripts etc. from breaking), # without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be # on the client anyway.. ascii_upload_enable=YES ascii_download_enable=YES # # You may fully customise the login banner string: #ftpd_banner=Welcome to blah FTP service. # # You may specify a file of disallowed anonymous e-mail addresses. Apparently # useful for combatting certain DoS attacks. #deny_email_enable=YES # (default follows) #banned_email_file=/etc/vsftpd.banned_emails # # You may specify an explicit list of local users to chroot() to their home # directory. If chroot_local_user is YES, then this list becomes a list of # users to NOT chroot(). chroot_local_user=YES chroot_list_enable=YES # (default follows) chroot_list_file=/etc/vsftpd.chroot_list # # You may activate the "-R" option to the builtin ls. This is disabled by # default to avoid remote users being able to cause excessive I/O on large # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume # the presence of the "-R" option, so there is a strong case for enabling it. ls_recurse_enable=YES pam_service_name=vsftpd userlist_enable=YES #enable for standalone mode listen=YES tcp_wrappers=YES use_localtime=YES pasv_promiscuous=YES xferlog_std_format=NO log_ftp_protocol=YES ftpd_banner=unknown ********Conf END********* | ||||
|
投稿日時: 2005-08-17 12:42
こんにちは。
直感的には、passive モード ( PASV ) に入っているのがまずいように思います。( ログの一番最後 ) 各FTPソフトで、activeモード・passiveモードを比べればはっきりするでしょう。 IEなら、インターネットオプション→詳細にあります。 以上、ご参考まで。 | ||||
|
投稿日時: 2005-08-17 13:33
こんにちわ.
ここではなく? -> angel様 anonymous と Log に書かれているので, これを YES にして vsftpd を restart してみてください -> drufyi様 | ||||
|
投稿日時: 2005-08-17 13:38
angel様ありがとうございます!
ブラウザのFTP関連の設定といえば、"FTPサイト用のフォルダービューを使用する" しかないと勝手に思い込んで、これにチェックがあるので、ブラウザはOKと 書き込んだのですが、もう少し下のほうにご指摘いただいた、 "パッシブFTPを使用する"にチェックが入っていました。 これをはずしたところいけました! 勉強になりました! 本当にありがとうございました! | ||||
|
投稿日時: 2005-08-17 13:39
返答している間にKAZ様も回答を頂いていたようで。
ご指摘頂いた項目も今後のトラブルに役立てたいと思います! ありがとうございました! | ||||
|
投稿日時: 2005-08-17 13:41
この辺の設定とFTPモードの相関関係については、 実は@IT内に詳細な記事があったりします。 http://www.atmarkit.co.jp/fwin2k/win2ktips/118ftpmode/118ftpmode.html | ||||
|
投稿日時: 2005-08-17 14:24
Mattun様ありがとうございます。
早速見させていただいています! | ||||
|
投稿日時: 2005-08-24 14:20
多分iptablesも使用してるでしょうから、FTPクライアントのPASVモードに対応で
きるようにする設定変更方法を参考まで。 設定変更内容は /etc/sysconfig/iptables-config への IPTABLES_MODULES="ip_conntrack_ftp" の追記です。 これにより、iptablesを再起起動すると、追加モジュールが読み込まれ、PASVクライアントからのアクセスに動的に対応するようになります。 |