Disable anonymous user and enable local user access in ftp
Question: How to Disable anonymous user and how enable local user access in ftp.
Answer: To Disable anonymous user and to enable local user access in ftp we need to edit ftp configuration file. I am using vsftpd as ftp server and the configuration file of vsftp is /etc/vsftpd/vsftpd.conf.
By default anonymous user login is enabled and by default local user login is disabled in vsftpd. Check the configuration file of vsftpd before editing it.
As you can see that anonymous user is been enabled and local user is been disabled. Let’s try to login in to linux ftp server as anonymous and local user.
As you can see that we can login as anonymous user and we were not able to login as ftp local user. Enabling anonymous user in ftp is a security problem. If you enabled anonymous user any one can login with out password so disabling anonymous user login is highly recommended. If you want to access ftp server as a local user, local user has to be enabled before that.
Let see how to disable anonymous user and how to enable local user access in ftp.
As you can see I have edited the vsftpd configuration setting to disable anonymous access and enabled local user access. vsftpd command is used to check the syntax of vsftpd configuration file. If the output for vsfptd command in nothing then all the syntax in vsftpd configuration are correct. If vsftpd command gives output then there is some problem in your syntax. You have to check it before restarting vsftpd services or else vsftpd server will be down.
To disable anonymous user change “anonymous_enable=NO” and to enable local user change “local_enable=YES“. Make sure that YES and NO are in capital letters. Don’t hash the line “anonymous_enable=YES” to disable anonymous ftp login it will not work.
At last success we have logged in successfully as local user and we have disabled anonymous user.
To know more about vsftpd use the following command