歡迎您光臨本站 註冊首頁

編譯安裝vsftpd沒有成功,但是rpm安裝就可以,問題待解決

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

編譯安裝vsftpd沒有成功,但是rpm安裝就可以,問題待解決

做了兩天的實驗,還是不成功,
環境是asianux 3.0 sp2 x86_64,系統為最小化安裝,
vsftpd版本為 vsftpd-2.2.0,官方下載的,
第一:
    首先在編譯安裝的時候提示的庫找不到。
    解決辦法:我將vsf_findlibs.sh腳本文件中的庫文件路徑都修改為/lib64/...,之後就可以編譯。
第二:
    我在配置過程中發現編譯安裝的怎麼的都不支持虛擬用戶的功能,然後我找了一個同樣環境機器的用rpm安裝就可以支持虛擬用戶,我看到配置文件中只有一點不同就是:
    rpm安裝的有個選項打開了tcp_wrappers=YES,
   然而編譯安裝的卻沒有,就算是打開了之後在啟動vsftpd的時候也提示編譯的時候沒有將tcp_wrappers編譯進來,所有我將編譯安裝的文件都刪除之後重新編譯,更改了頭文件中的builddefs.h中的選項#undef VSF_BUILD_TCPWRAPPERS變為#dfineVSF_BUILD_TCPWRAPPERS,然後再次重新編譯,安裝.
    雖然安裝之後支持了tcp_wrappers,但是還是不支持虛擬用戶.
    我用的配置文件都是在rpm安裝測試成功的(這些配置是支持虛擬用戶的),直接拷貝過來的,問題不知道出在什麼地方?
    我的/etc/pam.d/vsftpd文件配置在兩種安裝方法中也都相同。
以下是我的/etc/vsftpd.conf配置文件內容
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
guest_enable=YES
guest_username=ftpvuser
以下是我/etc/pam.d/vsftpd配置內容:
auth        required    pam_userdb.so    db=/etc/vsftpd/vsftpd_login
account        required    pam_userdb.so    db=/etc/vsftpd/vsftpd_login

    問題沒有解決,待續,可能是這個vsftpd版本在asianux中有bug,我會到其他系統,如redhat或是在這個系統上用其他版本實驗的。如果發現了問題一定和大家分享!
《解決方案》

缺什麼添什麼,不是有錯誤信息么?
《解決方案》

回復 #2 vermouth 的帖子

在我把錯誤信息都解決了之後還是不行,我看日誌只是說tom登錄失敗,tom是我建立的虛擬用戶,映射成ftpvuser這個系統用戶上了。剩下就沒有其他錯誤信息了。不知道哪位鵬到過此類現象,分享一下經驗。
《解決方案》

自己先頂一下!
《解決方案》

發下我的配置文件vsftpd.conf

#upload=YES

anonymous_enable=YES

# Uncomment this to allow local users to log in.

local_enable=YES

write_enable=YES

local_umask=077

anon_upload_enable=YES

anon_umask=022

anon_mkdir_write_enable=YES

anon_other_write_enable=YES

anon_upload_enable=YES

guest_enable=YES
#

dirmessage_enable=YES

xferlog_enable=YES

connect_from_port_20=YES

#chown_uploads=YES

#file_open_mode=0777

#chown_username=ftp
# below.
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd whith two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
《解決方案》

回復 #5 yijiajing 的帖子

你的配置問價只是打開了虛擬用戶的功能,但是虛擬用戶映射成哪個系統用戶呀,你這沒有寫配,你現在可以用虛擬用戶登錄?你確定?

[火星人 ] 編譯安裝vsftpd沒有成功,但是rpm安裝就可以,問題待解決已經有526次圍觀

http://coctec.com/docs/service/show-post-20875.html