After vsftp is configured in RHEL5, the root user upload permission is enabled and the system firewall is disabled. However, "500 OOPS: cannotchangedirectory:" still appears during ftp connection: /root "error. How can this problem be solved? After many explorations, I finally had a solution to the problem. How can I enable the upload permission of the root user and disable the firewall of the system. To put it bluntly, you have enabled the root user upload function.
After vsftp is configured in RHEL5, the root user upload permission is enabled and the system firewall is disabled. However, "500 OOPS: cannot change directory:" still appears during ftp connection: /root "error. How can this problem be solved?
After many explorations, I finally had a solution to the problem.
How can I enable the upload permission of the root user and disable the firewall of the system.
To put it bluntly, when the root user upload permission is enabled and the system firewall is disabled, the error "500 OOPS: cannot change directory:/root" still appears during ftp connection, how can this problem be solved?
Solution:
1. Check the status of SELinux: sestatus-B | grep ftp. To be exact, it only checks the status of ftp.
2. ftp_home_dir off is displayed in the displayed result.
Tftpd_disable_trans off
And so on. Now we only need to set one of them to on.
3. setsebool-P ftpd_disable_trans on or setsebool-P ftp_home_dir on
4. restart vsftpd: service vsftpd restart
5. enjoy the fun of ftp.
[Root @ Squid vsftpd] # cat vsftpd. conf
Anonymous_enable = NO
Local_enable = YES
Chroot_local_user = YES
Local_root =/www/websites/webtracker
# Local_root =/www
Write_enable = YES
Local_umask = 022
Dirmessage_enable = YES
Xferlog_enable = YES
Xferlog_file =/var/log/vsftpd. log
Connect_from_port_20 = YES
Xferlog_std_format = YES
Listen = YES
Pam_service_name = vsftpd
Userlist_enable = YES
Userlist_deny = NO
Tcp_wrappers = YES
Cmds_allowed = ABOR, CWD, LIST, MDTM, MKD, NLST, PASS, PASV, PORT, PWD, QUIT, RETR, RNFR, RNTO, SIZE, STOR, TYPE, USER, REST, CDUP, HELP, MODE, NOOP, REIN, STAT, STOU, STRU, SYST, FEAT, DELE
[Root @ Squid vsftpd] # cat user_list
# Vsftpd userlist
# If userlist_deny = NO, only allow users in this file
# If userlist_deny = YES (default), never allow users in this file, and
# Do not even prompt for a password.
# Note that the default vsftpd pam config also checks/etc/vsftpd/ftpusers
# For users that are denied.
# Root
# Bin
# Daemon
# Adm
# Lp
# Sync
# Shutdown
# Halt
# Mail
# News
# Uucp
# Operator
# Games
# Nobody
Www