日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

Solaris FTP issue( 二 )


可以參考man手冊

# ftpconfig -d /pub
Creating directory /pub
Updating directory /pub
#


Solaris 小于8 的 FTP log 設置



a: 創(chuàng)建ftp log文件
# touch /var/adm/ftpd.

b: 編輯inet服務配置文件
#vi /etc/inetd.conf.

# Ftp and telnet are standard Internet services.
ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd
修改成:
ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd -d -l

-d: 從syslogd得到 debug.info
-l: list 每一個FTP session


c: restart inetd daemons:

# ps -ef | grep inetd
root 14017 1 0 15:15:27 ? 0:01 /usr/sbin/inetd -s
# kill -1
#
note: -1 ,重新讀取配置文件并初始化進程 , 等于 kill -HUP .



d: 修改syslogd.conf并從新啟動
# vi /etc/syslog.conf


daemon.debug /var/adm/ftpd <<-----增加這一行

note: 中間用tab , 不能用空格 , 會出錯的 。

# ps -ef | grep syslogd
root 14076 1 0 15:33:07 ? 0:08 /usr/sbin/syslogd
root 16039 16001 0 12:27:03 pts/5 0:00 /usr/bin/grep syslogd
# kill -1 【Solaris FTP issue】




f: 驗證

# ps -ef | grep syslogd
root 14076 1 0 15:33:07 ? 0:08 /usr/sbin/syslogd


# fuser /var/adm/ftpd
/var/adm/ftpd: 14076o
#


自動get文件的教本~


#!/usr/bin/sh
# Change HOSTNAME, USER, PASSWD and FILENAME appropriately
# Do NOT include any comment lines between LABELs
# The only thing that can appear between LABELs are valid ftp commands
# the -n switch is necessary
/usr/bin/ftp -n << LABEL
open HOSTNAME
user USER PASSWD
binary
get FILENAME
bye
LABEL


自動獲得多個文件的腳本 ~

#!/usr/bin/sh
# Change HOSTNAME, USER, and PASSWD appropriately. The mput *.HTML file could be anything (*.txt, file*, etc)
# Do NOT include any comment lines between LABELs
# The only thing that can appear between LABELs are valid ftp commands
# the -n switch is necessary. The -i switch turns off interactive prompting during multiple file transfers.
/usr/bin/ftp -in << LABEL
open HOSTNAME
user USER PASSWD
binary
mput *.html
bye
LABEL


如果有防火墻 , 那么需要用到rftp來自動獲取文件 ~~

#!/usr/bin/sh
# Change HOSTNAME, USER, PASSWD and FILENAME appropriately
# Do NOT include any comment lines between LABELs
# The only thing that can appear between LABELs are valid ftp commands
# the -n switch is necessary
# rftp is a SOCKS clIEnt version of ftp. Happily provided at Sun in /usr/dist/exe.
# Do not know where rftp can be obtained but a man page is at:
# http://support.qnx.com/support/docs/qnx_neutrino/utilities/r/rftp.html
/usr/sbin/rftp -n << LABEL
open HOSTNAME
user USER PASSWD
binary
get FILENAME
bye
LABEL

推薦閱讀