CentOS提示“500 OOPS: cannot change

來源:互聯網
上載者:User

CentOS提示“500 OOPS: cannot change
在CentOS 上完成VSFTP安裝之後,測試 FTP 伺服器驗證登入,提示“500 OOPS: cannot change directory:/home/xxx”,不能切換到使用者宿主目錄?一看到與宿主目錄有關,第一反應就是會不會又跟 SELinux 中的策略有關,因為之前測試 Samba 實現“允許使用者通過 Windows 用戶端訪問自己的宿主目錄”,就需要先執行 setsebool -P samba_enable_home_dirs on,而且用 getsebool -a | grep ftp 也看到了一個“ftp_home_dir –> off”。不過還是先百度了一下,繼而在終端下執行:
  # setsebool ftpd_disable_trans 1
  # service vsftpd restart
  結果剛執行完第一條就提示“Could not change active booleans: Invalid boolean”,又是沒見過的提示,baidu~,果然與那個“ftp_home_dir”有關,執行:
  # setsebool ftp_home_dir on(註:在服務 running 狀態下執行時間會比較久)
  then~
  # ftp 192.168.2.2
  Connected to 192.168.2.2 (192.168.2.2).
  220 (vsFTPd 2.2.2)
  Name (192.168.2.2:root): azune
  331 Please specify the password.
  Password:
  230 Login successful.
  Remote system type is UNIX.
  Using binary mode to transfer files.
  ftp> ls
  227 Entering Passive Mode (192,168,2,2,54,76).
  150 Here comes the directory listing.
  drwxr-xr-x 2 500 500 4096 Sep 18 10:27 Desktop
  drwxr-xr-x 2 500 500 4096 Sep 18 10:27 Documents
  drwxr-xr-x 2 500 500 4096 Sep 18 10:27 Downloads
  drwxr-xr-x 2 500 500 4096 Sep 18 10:27 Music
  drwxr-xr-x 2 500 500 4096 Sep 18 10:27 Pictures
  drwxr-xr-x 2 500 500 4096 Sep 18 10:27 Public
  drwxr-xr-x 2 500 500 4096 Sep 18 10:27 Templates
  drwxr-xr-x 2 500 500 4096 Sep 18 10:27 Videos
  226 Directory send OK.
  ftp> exit
  221 Goodbye.
  至於 ftp 登入時提示“-bash: ftp: command not found”的話,是缺少 ftp 用戶端的包,安裝上就好了。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.