无码视频在线观看,99人妻,国产午夜视频,久久久久国产一级毛片高清版新婚

  • 始創(chuàng)于2000年 股票代碼:831685
    咨詢熱線:0371-60135900 注冊(cè)有禮 登錄
    • 掛牌上市企業(yè)
    • 60秒人工響應(yīng)
    • 99.99%連通率
    • 7*24h人工
    • 故障100倍補(bǔ)償
    全部產(chǎn)品
    您的位置: 網(wǎng)站首頁 > 幫助中心>文章內(nèi)容

    Linux Vsftpd本地用戶不能登錄問題

    發(fā)布時(shí)間:  2012/8/11 10:06:01
     打開/etc/selinux/config

    將selinux=enforcing或permissive改成disabled。

    記得要重新啟動(dòng)服務(wù)器!

    當(dāng)然還要確定以下問題:

    1、用戶是否被 vsftpd 限制登錄, 比如用戶名在 /etc/ftpusers 中,并被阻止登錄了

    2、vsftpd.conf 中是否打開了pam認(rèn)證的選項(xiàng) (自己編譯安裝的時(shí)候常因?yàn)檫@個(gè)出錯(cuò)) (看vsftpd.conf中是否有pam_service_name=ftp或vsftpd.到底是哪個(gè)要看

    PAM模塊的服務(wù)文件/etc/pam.d下是誰.我的是ftp且它的配置如下:

    #%PAM-1.0

    auth required /lib/security/pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed

    auth required /lib/security/pam_unix.so shadow nullok

    auth required /lib/security/pam_shells.so

    account required /lib/security/pam_unix.so

    session required /lib/security/pam_unix.so

    如果/etc/ftpusers有的用戶將被deny

    3、相關(guān)文件夾的權(quán)限是否正確

    關(guān)于“vsftpd 部分本地用戶不能登錄,部分可以”的問題,

    系統(tǒng)中原來就有的本地帳號(hào)都不能登錄,我的/etc/vsftpd/vsftpd.conf文件的配置如下:

    local_enable=YES

    write_enable=YES

    chroot_local_user=YES

    pam_service_name=vsftpd

    /etc/pam.d/vsftpd存在且正常。

    登錄時(shí)錯(cuò)誤信息都是一樣的:

    500 OOPS: cannot change directory:/home/xxxx

    Login failed.

    421 Service not available, remote server has closed connection

    他們的home目錄都是/home/xxxx。/home和/home/xxxx的權(quán)限都是755。

    以上這些帳號(hào)都不能ftp登錄,這些都是平常經(jīng)常使用的,可以用shell登錄的。

    我新創(chuàng)建了一個(gè)usr1帳號(hào)

    # useradd -G test -d /tmp/usr1 usr1

    能ftp登錄,他的home為/tmp/usr1,在/分區(qū)上。而/home我是mount到/dev/hda9上的。

    #mount

    /dev/hdb1 on / type ext3 (rw)

    /dev/hda9 on /home type ext2 (rw)

    所以,我猜想:是否是由于/home分區(qū)的原因,而造成“主目錄在/home分區(qū)的帳號(hào)”都不能登錄呢?

    為了驗(yàn)證以上設(shè)想,我試著再創(chuàng)建了一個(gè)帳號(hào)

    useradd -G test -d /home/usr3 usr3

    /home, /home/usr3 的權(quán)限都是755。

    usr3 ftp登錄失敗。

    500 OOPS: cannot change directory:/home/usr3

    Login failed.

    421 Service not available, remote server has closed connection

    至此,我覺得可以確定是由于/home分區(qū)的原因,而造成“主目錄在/home分區(qū)的帳號(hào)”都不能登錄。

    參考文章:

    I finished my second upgrade to Fedora Core 4. Not everything is ironed out yet with the build of course. But one thing is for sure a lot has happened to the RedHat I knew before.

    I must say of all the changes, for me the nicest addition is the new SELinux extensions. For deep background on the reasons for and theory of SELinux read, The Inevitability of Failure: The Flawed Assumption of Security in Modern Computing Environments

    The more I work with SELinux the more I realize I need to know about it, and how exactly it does all its stuff. It certainly changes things relating to users, directories and access. As I am starting to learn it, I'm sure I'm doing things the hard-way. :)

    The major difference, so far for me, in Red Hat's SELinux is the way ftp is handled. vsftpd is still the server which is great. However, it seems to be designed to run as a daemon rather than invoked via xinet.d. If you grab a working copy of the xinet.d file for vsftpd you can invoke it via xinet.d wrapper. I did my first server upgrade in this manner. The current one I am trying as a daemon. I certainly think I will miss some of the features that the xinet.d wrapper brings, and may yet return to it.

    Of all the issues I saw most notable is if you want to enable chroot directory's outside of the normal /home/xxx vsftpd. These will fail with a

    500 OOPS: cannot change directory: /mnt/xxxxx

    I was able to use ftp if I logged in with an account with a directory in /home, but once I set a user account to have a home drive outside of /home (in this case on a mounted secondary disk) vsftpd barfs the above.

    I found information at the NSA that indicates you can disable SELinux protection of the ftp daemon.

    setsebool -P ftpd_disable_trans 1

    This seems a bit drastic. It certainly works for now though.

    I think ultimately the issue resides with policies, but as SELinux policies are new to me, it will take time before it all gets sorted out. As I spend time with the new SELinux extensions in Fedora Core 4 I will keep you updated on my thoughts and configuration lessons.

    解決辦法:

    # setsebool ftpd_disable_trans 1

    # service vsftpd restart

    我用的是FC4,按照你上一帖子里的方法試了,馬上就解決了。所以,可以確定原因就在SELinux。


    本文出自:億恩科技【mszdt.com】

    服務(wù)器租用/服務(wù)器托管中國五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]

  • 您可能在找
  • 億恩北京公司:
  • 經(jīng)營性ICP/ISP證:京B2-20150015
  • 億恩鄭州公司:
  • 經(jīng)營性ICP/ISP/IDC證:豫B1.B2-20060070
  • 億恩南昌公司:
  • 經(jīng)營性ICP/ISP證:贛B2-20080012
  • 服務(wù)器/云主機(jī) 24小時(shí)售后服務(wù)電話:0371-60135900
  • 虛擬主機(jī)/智能建站 24小時(shí)售后服務(wù)電話:0371-60135900
  • 專注服務(wù)器托管17年
    掃掃關(guān)注-微信公眾號(hào)
    0371-60135900
    Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權(quán)所有  地址:鄭州市高新區(qū)翠竹街1號(hào)總部企業(yè)基地億恩大廈  法律顧問:河南亞太人律師事務(wù)所郝建鋒、杜慧月律師   京公網(wǎng)安備41019702002023號(hào)
      1
     
     
     
     

    0371-60135900
    7*24小時(shí)客服服務(wù)熱線