AIX起動時にFTPが失敗する

AIX起動時にFTPが失敗する

ftpAIXには、vsftpdサーバーを実行している他のホストへのFTPS接続を確立するスクリプトがあります。

/usr/bin/ftp -snv host 8081 <<END_SCRIPT 
debug
user anonymous pass
passive
binary
debug
quote pwd
quit
END_SCRIPT

上記のスクリプトをシェルで正常に実行すると正常に動作します。

作業結果

Connected to host.
220 secure FTP service
Debugging on (debug=1).
---> AUTH TLS
234 Proceed with negotiation.
TLS Auth Entered.
TLS handshake succeeded, though Server signed it's own cert!
Certificate:
    Data:
        Version: 3 (0x2)

ただし、同じスクリプトを/etc/rc.dまたはに追加すると、/etc/inittabスクリプトはSSLネゴシエーションを実行できず、失敗します。

initスクリプトで実行したときのエラー出力

Connected to host.
220 secure FTP service
234 Proceed with negotiation.
Ftp configuration failed
ERROR  Error setting BIO object for the control connection
FTP: Unable to authenticate to Server.
TLS Auth Entered.
Passive mode on.
421 Service not available, remote server has closed connection

これがinitスクリプトの実行中に存在しなかった環境設定に関連しているかどうかはわかりません。

助けてくれてありがとう。

ベストアンサー1

多くのデバッグを行った後の問題は、initスクリプトで起動時に環境変数が設定されておらず、不明な理由で変数を設定するftp必要があることです。$HOME

エクスポートするためにスクリプトを変更$HOMEした後ftpは正常に動作します。

おすすめ記事