[PHP-users 15920]Re: ftp_execについて

HOTTA Michihide hotta @ net-newbie.com
2003年 6月 13日 (金) 10:56:36 JST


堀田です。

From: Take <office @ j-ken.com>
Subject: [PHP-users 15919] ftp_execについて
Date: 2003/06/13 10:37:45

> サーバーAからサーバーBのプログラムを実行したいために、
> マニュアル(http://de3.php.net/manual/ja/function.ftp-exec.php)
> にあるftp_exec関数を利用してみたのですが、
> 実行されずに、
> PHP Warning:  ftp_exec(): 'SITE EXEC' not understood. 
> とエラーになってしまいます。

FTP プロトコル経由でリモートコマンドの実行ができるんですね。
知らなかった…。

ということで、早速試してみました。VineSeed 環境です。

hotta @ vm_seed ~$ cat /etc/issue

Vine Linux 2.6 (La Fleur de Bouard)
Kernel 2.4.19-0vl11 on an i686

hotta @ vm_seed ~$ ncftp -u hotta localhost
NcFTP 3.1.5 (Oct 13, 2002) by Mike Gleason (ncftp @ ncftp.com).
Connecting to 127.0.0.1...
ProFTPD 1.2.7 Server (ProFTPD Default Installation) [vm_seed.18software.co.jp]
Logging in...
(略)
User hotta logged in.
Logged in to localhost.
ncftp /home/hotta > ? site
site: sends a host-specific FTP command to the remote server.
Usage: site command-string

For details, please see the manual ("man ncftp" at your regular shell prompt
or online at http://www.ncftp.com/ncftp/doc/ncftp.html).
ncftp /home/hotta > site exec
'SITE EXEC' not understood

ということで、FTP サーバ自体が SITE EXEC を理解しない(未サポー
トもしくは無効になっている)ということではないでしょうか。

ということで、対処としては

1.お使いの FTP サーバで、当該機能を有効にできないか調べる。
  →できなければ、別の FTP サーバに乗り換える。
2.別の方法(ssh,rexecなど)に乗り換える。
3.そもそも、最終的に実現したいのは何かを書いてみる。
  →より適切な方法を、どなたかが提案してくれるかもしれません。

てな感じでしょうか。

-- 
堀田 倫英 <hotta @ net-newbie.com> <http://www.net-newbie.com>


PHP-users メーリングリストの案内