IDC知識庫
IDC領(lǐng)域?qū)I(yè)知識百科平臺

創(chuàng)建ftp服務(wù)器無法使用

Linux使用vsftp創(chuàng)建FTP器,安裝以及啟動都按照網(wǎng)上說的一步一步操作,沒有發(fā)現(xiàn)問題。但是創(chuàng)建ftp服務(wù)器后使用本地用戶無法登錄使用。

ftp服務(wù)器無法用本地用戶登錄:

[test@client home]$ ftp 192.168.221.129
Connected to 192.168.221.129 (192.168.221.129).
220 (vsFTPd 2.2.2)
Name (192.168.221.129:test): test
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/test
Login failed.

//但是lftp可以用本地用戶登錄
1.檢查 是否是vsftp服務(wù)器端家目錄權(quán)限問題?
[root@review1 home]# chmod +r test
[root@review1 home]# ls
test
[root@review1 home]# ll
total 4
drwxr–r–. 2 test test 4096 May 27 10:57 test
再次登錄,無效。

2.檢查本地用戶test是否存在,是否有密碼

[root@review1 ~]# tail -5 /etc/passwd
saslauth:x:499:76:”Saslauthd user”:/var/empty/saslauth:/sbin/nologin
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
ntp:x:38:38::/etc/ntp:/sbin/nologin
test:x:500:500::/home/test:/bin/bash

[root@review1 ~]# passwd test
Changing password for user test.
New password:
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
存在,密碼正常。

3.檢查客戶端本地用戶是否存在

[root@client ~]# tail -5 /etc/passwd
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
test:x:500:500::/home/test:/bin/bash

[root@client ~]# passwd test
Changing password for user test.
New password:
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
存在,設(shè)置正常。再次登錄,登錄失敗!

4.檢查、關(guān)閉selinux,重新連接,失敗。
5. 重啟vsftp,再次測試,成功。

[root@mysql ~]# ftp 192.168.221.129
Connected to 192.168.221.129 (192.168.221.129).
220 (vsFTPd 2.2.2)
Name (192.168.221.129:root): test
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.

總結(jié):
用戶無法進(jìn)入家目錄,是 因?yàn)?SElinux限制了本地ftp用戶的訪問,需要關(guān)閉SELinux,但是關(guān)閉后還需要重新啟動vsftp服務(wù),否則無法生效!

vps涓繪満
域名頻道提供2U大小標(biāo)準(zhǔn)的服務(wù)器托管服務(wù),帶寬從1M到100M可選。
托管網(wǎng)絡(luò)設(shè)備擴(kuò)展方便,可以隨意增加硬盤和內(nèi)存,完全自己獨(dú)立使用,不受其他客戶影響。
為客戶提供標(biāo)準(zhǔn)的環(huán)境配置及初始安全配置服務(wù),在線客服支持。
域名頻道獨(dú)立服務(wù)器租用送服務(wù)器產(chǎn)權(quán),上海電信機(jī)房,超實(shí)惠的進(jìn)入搶購http://nrfpj.cn/server/

贊(7)
分享到: 更多 (0)

中國專業(yè)的網(wǎng)站域名及網(wǎng)站空間提供商

買域名買空間