500 OOPS:Vsftpd: refusing to run with writable anonymous root
If we have started the vsFTPd server, but the logon test will show a message similar to the following;
500 OOPS: vsftpd: refusing to run with writable anonymous root
This indicates that the permissions on the home directory of the ftp user are incorrect and should be changed;
- [root@localhost ~]# more /etc/passwd |grep ftp
-
- ftp:x:1000:1000:FTP User:/var/ftp:/sbin/nologin
-
We found that the ftp user's home directory is in/var/ftp, which is caused by incorrect/var/ftp permissions. the permissions of this directory cannot be opened; it is because you have run chmod 777/var/ftp. If you do not have an ftp user's home directory, you must create one by yourself;
The Home Directory of the following FTP users cannot be fully open to all users, user groups, and other user groups;
- [root@localhost ~]# ls -ld /var/ftp
-
- drwxrwxrwx 3 root root 4096 2005-03-23 /var/ftp
-
The following method should be used to correct this error;
- [root@localhost ~]# chown root:root /var/ftp
-
- [root@localhost ~]# chmod 755 /var/ftp
-
Some may say, What should I do if anonymous users are readable, downloadable, and uploadable? This is also simple. You can create a directory under/var/ftp and set the permission to 777. Then you can change vsftpd. conf to OK. There is no difficulty;
For security considerations, vsFTPd does not allow ftp users' home directory permissions to be completely unrestricted. You can read the vsFTPd documentation to understand it; otherwise, it cannot be called the safest FTP server, right?