Skip to content

Commit d8c4966

Browse files
committed
# minor changes secure_ftp_server_vsftpd
* sentence simplification and wording changes
1 parent 1ca58c7 commit d8c4966

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

docs/guides/file_sharing/secure_ftp_server_vsftpd.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,18 @@ tags:
2020

2121
## Introduction
2222

23-
`vsftpd` is the Very Secure FTP Daemon (FTP being the file transfer protocol). It has been available for many years now, and is actually the default FTP daemon in Rocky Linux, and many other Linux distributions.
23+
`vsftpd` is the Very Secure FTP Daemon (FTP being the file transfer protocol). It has been available for many years, and is the default FTP daemon in Rocky Linux and many other Linux distributions.
2424

25-
`vsftpd` allows for the use of virtual users with pluggable authentication modules (PAM). These virtual users do not exist in the system, and have no other permissions except to use FTP. If a virtual user gets compromised, the person with those credentials will have no other permissions after gaining access as that user. Using this setup is very secure indeed, but does require a bit of extra work.
25+
`vsftpd` allows for the use of virtual users with pluggable authentication modules (PAM). These virtual users do not exist in the system and have no other permissions except FTP. If a virtual user gets compromised, the person with those credentials will have no other permissions after gaining access as that user. This setup is very secure but requires a bit of extra work.
2626

2727
!!! tip "Consider `sftp`"
2828

29-
Even with the security settings used here to set up `vsftpd`, you may want to consider `sftp` instead. `sftp` will encrypt the entire connection stream and is more secure for this reason. We have created a document called [Secure Server - `sftp`](../sftp) that deals with setting up `sftp` and the locking down SSH.
29+
Even with the security settings used here to set up `vsftpd`, you may want to consider `sftp` instead. `sftp` will encrypt the entire connection stream and is more secure. We have created a document called [Secure Server - `sftp`](../sftp) that deals with setting up `sftp` and the locking down SSH.
3030

3131
## Installing `vsftpd`
3232

33-
You also need to ensure the installation of `openssl`. If you are running a web server, this probably **is** already installed, but just to verify you can run:
33+
You must also ensure the `openssl` installation. If you are running a web server, this probably **is** already installed, but just to verify you can run:
34+
3435

3536
```
3637
dnf install vsftpd openssl
@@ -46,7 +47,7 @@ Do not start the service just yet.
4647

4748
## Configuring `vsftpd`
4849

49-
You want to ensure the disabling of some settings and the enabling of others. Generally, when you install `vsftpd`, it includes the most sane options already set. It is still a good idea to verify them.
50+
You want to ensure the disabling of some settings and enabling others. Generally, installing `vsftpd` includes the most sane options already set. It is still a good idea to verify them.
5051

5152
To check the configuration file and make changes when necessary, run:
5253

@@ -66,7 +67,7 @@ Ensure that "local_enable" is yes:
6667
local_enable=YES
6768
```
6869

69-
Add a line for the local root user. If the server that you are installing this on is a web server, our assumption is that you will be using the [Apache Web Server Multi-Site Setup](../web/apache-sites-enabled.md), and that your local root will reflect that. If your setup is different, or if this is not a web server, adjust the "local_root" setting:
70+
Add a line for the local root user. If the server is a web server, and you use the [Apache Web Server Multi-Site Setup](../web/apache-sites-enabled.md), your local root will reflect that. If your setup is different, or if this is not a web server, adjust the "local_root" setting:
7071

7172
```
7273
local_root=/var/www/sub-domains
@@ -98,7 +99,7 @@ nopriv_user=vsftpd
9899
guest_username=vsftpd
99100
```
100101

101-
You need to add a section near the bottom of the file to force encryption of passwords sent over the internet. You need `openssl` installed and you will need to create the certificate file for this also.
102+
You need to add a section near the bottom of the file to force encryption of passwords sent over the internet. You need `openssl` installed and you must also create the certificate for this.
102103

103104
Start by adding these lines at the bottom of the file:
104105

@@ -161,7 +162,7 @@ Next is the organizational unit name. You can fill this in if the server is for
161162
Organizational Unit Name (eg, section) []:
162163
```
163164

164-
The the next field needs filling in, but you can decide how you want it. This is the common name of your server. Example: `webftp.domainname.ext`:
165+
The following field needs filling in, but you can decide how you want it. This is the common name of your server. Example: `webftp.domainname.ext`:
165166

166167
```
167168
Common Name (eg, your name or your server's hostname) []:
@@ -177,7 +178,7 @@ When completed, the certificate creation will occur.
177178

178179
## <a name="virtualusers"></a>Setting up virtual users
179180

180-
As stated earlier, using virtual users for `vsftpd` is much more secure because they have no system privileges at all. That said, you need to add a user for the virtual users to use. You also need to add a group:
181+
As stated earlier, using virtual users for `vsftpd` is much more secure because they have no system privileges. That said, you need to add a user for the virtual users. You also need to add a group:
181182

182183
```
183184
groupadd nogroup
@@ -192,7 +193,7 @@ Go to the configuration directory for `vsftpd`:
192193
cd /etc/vsftpd
193194
```
194195

195-
You need to create a password database. You use this database to authenticate our virtual users. You need to create a file to read the virtual users and passwords from. This will create the database.
196+
You need to create a password database. You use this database to authenticate our virtual users. You need to create a file to read the virtual users and passwords. This will create the database.
196197

197198
In the future, when adding users, you will want to duplicate this process again:
198199

@@ -281,7 +282,7 @@ This will enable login for your virtual users defined in `vsftpd-virtual-user.db
281282

282283
## Setting up the virtual user's configuration
283284

284-
Each virtual user has their own configuration file, which specifies their own "local_root" directory. Ownership of this local root is the user "vsftpd" and the group "nogroup".
285+
Each virtual user has a configuration file, specifying their own "local_root" directory. Ownership of this local root is the user "vsftpd" and the group "nogroup".
285286

286287
Refer to [Setting Up Virtual Users section above.](#virtualusers) To change the ownership for the directory, enter this at the command line:
287288

@@ -316,12 +317,12 @@ systemctl restart vsftpd
316317

317318
You can test your setup with the command line on a machine and test access to the machine with FTP. That said, the easiest way to test is to test with an FTP client, such as [FileZilla](https://filezilla-project.org/).
318319

319-
When you test with a virtual user to the server running `vsftpd`, you will get an SSL/TLS certificate trust message. This trust message is saying to the person that the server uses a certificate and asks them to approve the certificate before continuing. When connected as a virtual user, you will be able to place files in the "local_root" folder.
320+
When you test with a virtual user to the server running `vsftpd`, you will get an SSL/TLS certificate trust message. This trust message tells the person that the server uses a certificate and asks them to approve it before continuing. You can place files in the "local_root" folder when connected as a virtual user.
320321

321322
If you are unable to upload a file, you might need to go back and verify each of the steps again. For instance, it might be that the ownership permissions for the "local_root" are not set to the "vsftpd" user and the "nogroup" group.
322323

323324
## Conclusion
324325

325-
`vsftpd` is a popular and common ftp server and can be a stand alone server, or part of an [Apache Hardened Web Server](../web/apache_hardened_webserver/index.md). If set up to use virtual users and a certificate, it is quite secure.
326+
`vsftpd` is a popular and common FTP server and can be a stand-alone server, or part of an [Apache Hardened Web Server](../web/apache_hardened_webserver/index.md). It is pretty secure if set up to use virtual users and a certificate.
326327

327328
This procedure has many steps to for setting up `vsftpd`. Taking the extra time to set it up correctly will ensure that your server is as secure as it can be.

0 commit comments

Comments
 (0)