Home   |  Lindowsのpage
2003/11/01

日本語版Lindows4.0−どう使うの?
ProFtpdをインストールし、ftpサーバーにする


Lindows からコマンドftpを利用してWindowsマシンにアクセスできたけど、
Lindowsマシンをftpサーバーにしたい。
どうすりゃいいの?






なんてことはなかった。
ftpソフトをインストールすればそれでよしだった。
以下のふたつがあったが、
Wu-ftpd
ProFTPD

ProFTPDの方がセキュリティが高いということで、こちらをインストールした。
インストール途中で、次の画面が出たが、OKボタンクリックですんなりと終ってしまった。





proftpdをinitd経由で実行すると言う確認画面 でした。
Lindows起動時にproftpdを実行してくるもので、特別に起動コマンドを入力しなくて済みます。




設定ファイルの編集−proftpd.conf

Lindowsの場合、設定ファイルは /etc/ の中にあった。



# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody/nogroup" and "ftp" for normal operation and anon.

ServerName            "Debian"
ServerType            standalone
DeferWelcome            off

MultilineRFC2228        on
DefaultServer            on
ShowSymlinks            on
AllowOverwrite            on

TimeoutNoTransfer        600
TimeoutStalled            600
TimeoutIdle            1200

DisplayLogin                    welcome.msg
DisplayFirstChdir               .message
ListOptions                    "-l"

DenyFilter            \*.*/

# Uncomment this if you are using NIS or LDAP to retrieve passwords:
#PersistentPasswd        off

# Uncomment this if you would use TLS module:
#TLSEngine             on

# Uncomment this if you would use quota module:
#Quotas                on

# Uncomment this if you would use ratio module:
#Ratios                on

# Port 21 is the standard FTP port.
Port                21

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances            30

# Set the user and group that the server normally runs at.
User                nobody
Group               nogroup

<Directory /*>
# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
  Umask                022  022
# Normally, we want files to be overwriteable.
  AllowOverwrite        on
</Directory>
 (この行にアク セスを許可するディレクトリを追加しました)

# A basic anonymous configuration, no upload directories.

# <Anonymous ~ftp>
#   User                ftp
#   Group                nogroup
#   # We want clients to be able to login with "anonymous" as well as "ftp"
#   UserAlias            anonymous ftp
#
#   RequireValidShell        off
#
#   # Limit the maximum number of anonymous logins
#   MaxClients            10
#
#   # We want 'welcome.msg' displayed at login, and '.message' displayed
#   # in each newly chdired directory.
#   DisplayLogin            welcome.msg
#   DisplayFirstChdir        .message
#
#   # Limit WRITE everywhere in the anonymous chroot
#   <Directory *>
#     <Limit WRITE>
#       DenyAll
#     </Limit>
#   </Directory>
#
#   # Uncomment this if you're brave.
#   # <Directory incoming>
#   #   # Umask 022 is a good standard umask to prevent new files and dirs
#   #   # (second parm) from being group and world writable.
#   #   Umask                022  022
#   #            <Limit READ WRITE>
#   #            DenyAll
#   #            </Limit>
#   #            <Limit STOR>
#   #            AllowAll
#   #            </Limit>
#   # </Directory>
#
# </Anonymous>




上記設定ファイルのままでは、ユーザーディレクトリに直接アクセスしたため、
アクセスを許可するディレクトリだけ次のように追加しました。

</Directory>
DefaultRoot                     ~/hoge



別のPCからアクセスをする
gftpを起動し、LindowsマシンのIPアドレス、ユーザー名、パ スワードを入力する。







linuxの場合、ftpコマンドでサーバーにアクセスできました。

[user@localhost user100]$ ftp 200.200.1.20   .......ftpコマンドの後にIPアドレス
Connected to 200.200.1.1 (200.200.1.20).
220 ProFTPD 1.2.8 Server (Debian)
Name (192.168.1.20:shigeko): username        .......ユーザー名入力
331 Password required for username.
Password:**********                          .......パスワード入力
230 User username logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (200.200.1.20).
150 Opening ASCII mode data connection for file list
drwxr-xr-x   3 user user      720 Nov  1 05:34 img
-rw-r--r--   1 users user     5790 Nov  1 04:31 index.htm
-rw-r--r--   1 users user    11812 Oct 31 12:45 lindows-grub.html
-rw-r--r--   1 users user   11592 Nov  1 05:19 lindows-proftpd.html
-rw-r--r--   1 user user     8178 Oct 31 13:53 lindows-webmin.html
-rw-r--r--   1 user user    10068 Oct 29 13:27 lindows_command_ftp_gftp.
html
-rw-r--r--   1 user user    8447 Oct 28 12:07 lindows_kdmtogdm.html
-rw-r--r--   1 user user     7280 Oct 30 10:34 webmin-inst-memo1.html
226 Transfer complete.
ftp> cd img
250 CWD command successful.



いとも簡単にインストールでき、ftpサーバーが出来ちゃいました。
これで、Lindowsマシンをfptサーバーとして起動しておき、他のWindowsマシン、Linuxマシンからファイルのアップロード、ダウンロー ドが自由に出来るようになりました。

特に、Linuxの場合には、GUIではGftp、CUIではftpコマンドで軽快にアクセス出来るところがいいですね。





Top


SEO [PR] !uO z[y[WJ Cu