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

Solaris FTP issue


Solaris 9 里面的FTP跟Solaris 8 還是有一定差別的
原來放在/etc/default/目錄里面 , 改成了在 /etc/ftpd/目錄下了 。

% ls -l
total 14
-rw-r--r-- 1 root sys 1518 May 28 00:46 ftpaccess
-rw-r--r-- 1 root sys 551 May 28 00:46 ftpconversions
-rw-r--r-- 1 root sys 104 May 28 00:46 ftpgroups
-rw-r--r-- 1 root sys 108 May 28 00:46 ftphosts
-rw-r--r-- 1 root sys 114 May 28 00:46 ftpservers
-rw-r--r-- 1 root sys 185 May 28 00:46 ftpusers

FTP 默認使用端口21 , 設置存在于文件/etc/services

% grep ftp services
ftp-data 20/tcp
ftp 21/tcp
tftp 69/udp



進程存在于 /etc/inetd.conf

% grep ftp inetd.conf
# ftp telnet shell login exec tftp finger printer
ftp stream tcp6 nowait root /usr/sbin/in.ftpd in.ftpd -a
# TFTPD - tftp server (primarily used for booting)
#tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot



如果想要修改ftp的端口號 , 可以直接在/etc/inetd.conf修改
(不用額外修改/etc/services)

格式如下:

# vi /etc/inetd.conf
# FTPD - FTP server daemon
ftp stream tcp6 nowait root /usr/sbin/ftpd.sh in.ftpd -P 221



當然需要重新啟動inetd

# ps -ef|grep inetd
root 219 1 0 20:33:53 ? 0:01 /usr/sbin/inetd -s
root 597 596 1 23:28:44 pts/5 0:00 grep inetd
# kill -HUP 219 <------- 219 PID of inetd


FTP Session的時間設置:

# vi /etc/ftpd/ftpaccess

limit-time anonymous 30
limit-time guest 60

單位是分鐘 。


# ftp ftpserver
Connected to ftpserver.
220 ftpserver FTP server ready.
Name (ftpserver:user1): anonymous
331 Guest login ok, send your complete e-mail address as passWord.
Password:
230 Guest login ok, access restrictions apply.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
bin
dev
etc
pub
usr
226 Transfer complete.
25 bytes received in 0.0029 seconds (8.50 Kbytes/s)
ftp>

Wait 30 minutes

ftp> ls
421 Timeout (900 seconds): closing control connection.
ftp>



對real用戶不起作用 。


ftp mask設置

ftp> site umask 000

200 UMASK set to 000 (was 022)

ftp> mkdir testdir1

257 "/tmp/testdir1" new Directory created.

ftp> dir

drwxrwxrwx 2 root other 117 Jul 25 12:05 testdir1

ftp> site chmod 777 foo

200 CHMOD command successful.




在solaris 6 7 8 中用下面方式

# vi /etc/default/ftpd

UMASK=nnn


設置 FTP loging

1. 取消/etc/ftpd/ftpaccess 文件中下面這行的注釋:

log commands real,guest,anonymous

2. 在/etc/syslog.conf 中添加:

daemon.info /var/log/ftplog

3. touch the file /var/log/ftplog

# touch /var/log/ftplog


4. 從新啟動syslogd.

# kill -HUP `pgrep syslogd`

5. 登陸并驗證:

test # cat ftplog
Nov 4 17:10:00 netlab11 ftpd[18885]: [ID 165209 daemon.info] USER root
Nov 4 17:10:02 netlab11 ftpd[18885]: [ID 125383 daemon.info] PASS
password
Nov 4 17:10:02 netlab11 ftpd[18885]: [ID 539042 daemon.info] failed
login from kerouac.East.Sun.COM [129.148.192.158]
Nov 4 17:10:04 netlab11 ftpd[18885]: [ID 225560 daemon.info] QUIT
Nov 4 17:10:10 netlab11 ftpd[18886]: [ID 165209 daemon.info] USER root
Nov 4 17:10:11 netlab11 ftpd[18886]: [ID 125383 daemon.info] PASS
password


因為ftplog使用的是 debug.info (facility/level) , 如果syslog.conf文件前面已經(jīng)有其他行使用了 debug.info , 那么相應的ftplog就會被記錄到那一行所對應的log文件中 。
如:
*.err;kern.debug;daemon.notice;mail.crit;daemon.info /var/adm/messages


Solaris 9 里面添加了wu-ftp , 配置匿名ftp變得更加簡單 。
wu-ftp (SUNWftpr, SUNWftpu) 兩個文件包 。

執(zhí)行 /usr/sbin/ftpconfig命令 。

推薦閱讀