- 論壇徽章:
- 0
|
FTP設(shè)置
配置ftp(系統(tǒng)自帶)
引用:
# ee /etc/inetd.conf
復(fù)制內(nèi)容到剪貼板
代碼:
ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l -h
//去掉ftp前的#號(hào)
引用:
# ee /etc/rc.conf
復(fù)制內(nèi)容到剪貼板
代碼:
inetd_enable="YES"
啟動(dòng)ftp
引用:
# killall -HUP inetd
添加ftp用戶(hù)組
引用:
# pw groupadd ftpgroup -g 10001
添加ftp用戶(hù)
引用:
# adduser
Username:ftp
Full name:
Uid (Leave empty for default):1001
Login group [ftpuser]: ftpgroup
Login group is ftpgrou. Invite ftpuser into other groups? []:
Login class [default]:
Shell (sh csh tcsh zsh nologin) [sh]:
Home directory [/home/ftpuser]:/usr/www
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:
Enter password again:
Lock out the account after creation? [no]:
Username : ftpuser
Password : *****
Full Name :
Uid : 1001
Class :
Groups : ftpgroup
Home : /usr/www
Shell : /bin/sh
Locked : no
OK? (yes/no) : yes
adduser: INFO: Successfully added (ftpuser) to the user database.
Add another user? (yes/no): no
Goodbye!
禁止匿名用戶(hù)登錄
引用:
# ee /etc/ftpusers
復(fù)制內(nèi)容到剪貼板
代碼:
anonymous
@guest
設(shè)定用戶(hù)使用目錄
引用:
# ee /etc/ftpchroot
復(fù)制內(nèi)容到剪貼板
代碼:
ftpusr /usr/www
設(shè)置用戶(hù)磁盤(pán)限額
引用:
# ee /etc/rc.conf
復(fù)制內(nèi)容到剪貼板
代碼:
enable_quotas="YES"
check_quotas="YES"
引用:
# ee /etc/fstab
復(fù)制內(nèi)容到剪貼板
代碼:
/dev/ad0s1f /usr ufs rw,userquota,groupquota 2 2
引用:
# quotacheck -av
# repquota –a
# edquota –u ftpuser
復(fù)制內(nèi)容到剪貼板
代碼:
/usr: kbytes in use: 0, limits (soft = 100000, hard = 100020) # soft是警告容量,hard是強(qiáng)制容量
引用:
# edquota –t
復(fù)制內(nèi)容到剪貼板
代碼:
/usr: block grace period: 1 minutes, file grace period: 1 minutes
引用:
# quotaon -a |
|