In our earlier tutorial, we discussed how to install & configure VSFTP without anonymous access. In this tutorial, we will discuss anonymous & selected user access to our VSFTP server.
Now, let's discuss configuring our VSFTP with anonymous access 'enabled'.
We must first allow Anonymous access to the configuration file. So open configuration file
then, enable anonymous access
restart server to implement changes.
This should allow anonymous access to our FTP server.But that only gives access to the server, user won't be able to upload any files there because file permissions are still not set for anonymous users.
To enable anonymous upload, we will firstly give all permissions to /etc/ftp/pub
Then we make changes in the configuration file
If using SElinux, use the following commands to set SELinux boolean values
and change the result to
restart service & our anonymous access user will now be able to upload files to ftp server.
Blocking access to user
In order to block access for a user (or users). Open /etc/vsftpd/ftpusers
and add the users you wish to block access to FTP. Save the file and restart the server to implement changes,
This will restrict the users mentioned in file to access our VSFTP server.
Allowing only a few users access
We can also configure our server to allow access to only few users & block rest of the users. To do this, open VSFTP configuration file
and make following changes
save the file & now open,
and add users that you want to grant access to the ftp in seperate lines.
Save the file & restart the service.
That's it guys, that concludes our tutorial for VSFTP. If you want to know more options for file sharing, you can also read my tutorial on NFS (Network File System). Please guys don't forget to provide your much-needed feedback or queries down below.