The CentOS prompt is "500 OOPS: cannot change
After VSFTP is installed on CentOS, test the FTP server to verify logon. The system prompts "500 OOPS: cannot change directory:/home/xxx". cannot I switch to the user's home directory? Once we see that it is related to the home directory, the first response is whether it is related to the policy in SELinux, because we tested Samba to "allow users to access their home directories through Windows clients ", you need to execute setsebool-P samba_enable_home_dirs on, and use getsebool-a | grep ftp to see a "ftp_home_dir-> off ". However, Baidu is the first, and then executed in the terminal:
# Setsebool ftpd_disable_trans 1
# Service vsftpd restart
After the first execution, the system prompts "cocould not change active booleans: Invalid boolean", which is also a prompt that has never been seen, baidu ~, It is related to the "ftp_home_dir". Run the following command:
# Setsebool ftp_home_dir on (Note: it takes a long time to run in the Service running State)
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, 54,76 ).
150 Here comes the directory listing.
Drwxr-xr-x 2 500 500 4096 Sep 18 Desktop
Drwxr-xr-x 2 500 500 4096 Sep 18 Documents
Drwxr-xr-x 2 500 500 4096 Sep 18 Downloads
Drwxr-xr-x 2 500 500 4096 Sep 18 Music
Drwxr-xr-x 2 500 500 4096 Sep 18 Pictures
Drwxr-xr-x 2 500 500 4096 Sep 18 Public
Drwxr-xr-x 2 500 500 4096 Sep 18 Templates
Drwxr-xr-x 2 500 500 4096 Sep 18 Videos
226 Directory send OK.
Ftp> exit
221 Goodbye.
If "-bash: ftp: command not found" is prompted during ftp logon, the ftp client package is missing and the installation is complete.