Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/feed-rss2.php on line 8
Install an FTP Server With ProFTPd on CentOS 6 or CentOS 7 – AKLWEB HOST LLC Support Center https://support.aklwebhost.com Tue, 30 May 2023 13:22:09 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.4 Install an FTP Server With ProFTPd on CentOS 6 or CentOS 7 https://support.aklwebhost.com/knowledgebase/install-an-ftp-server-with-proftpd-on-centos-6-or-centos-7/ https://support.aklwebhost.com/knowledgebase/install-an-ftp-server-with-proftpd-on-centos-6-or-centos-7/#respond Tue, 30 May 2023 13:22:07 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=3766 In this guide, we will see how to configure an FTP server (ProFTPd) to transfer files between your PC and your server.

Prerequisites

  • A newly deployed AKLWEB HOST CentOS server instance.
  • Sudo user.

Installation

Update the system.

yum check-update

Official RHEL/CentOS 6/7 repositories do not provide any binary packages for ProFTPD Server, so you need to add extra package repositories on your system provided by EPEL 6/7 repo using one of the following commands.

CentOS 6:

sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

CentOS 7:

sudo rpm -Uvh http://ftp.astral.ro/mirrors/fedora/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm

Download all of the metadata for the currently enabled yum repos.

sudo yum makecache

Install proftpd.

sudo yum install proftpd

Install ftp.

sudo yum install ftp

Configuration

Open the ProFTPd configuration file.

sudo nano /etc/proftpd.conf

The file will resemble the following text.

The file will resemble the following text.

# This is the ProFTPD configuration file

#

# See: http://www.proftpd.org/docs/directives/linked/by-name.html



# Server Config - config used for anything outside a <VirtualHost> or <Global> $

# See: http://www.proftpd.org/docs/howto/Vhost.html



ServerName                      "ProFTPD server"

ServerIdent                     on "FTP Server ready."

ServerAdmin                     root@localhost

DefaultServer                   on



# Cause every FTP user except adm to be chrooted into their home directory

# Aliasing /etc/security/pam_env.conf into the chroot allows pam_env to

# work at session-end time (http://bugzilla.redhat.com/477120)

VRootEngine                     on

DefaultRoot                     ~ !adm

VRootAlias                      /etc/security/pam_env.conf etc/security/pam_env$



# Use pam to authenticate (default) and be authoritative

AuthPAMConfig                   proftpd

AuthOrder                       mod_auth_pam.c* mod_auth_unix.c

# If you use NIS/YP/LDAP you may need to disable PersistentPasswd

#PersistentPasswd               off



# Don't do reverse DNS lookups (hangs on DNS problems)

UseReverseDNS                   off



# Set the user and group that the server runs as

User                            nobody

Group                           nobody



# To prevent DoS attacks, set the maximum number of child processes

# to 20.  If you need to allow more than 20 concurrent connections

# at once, simply increase this value.  Note that this ONLY works

# in standalone mode; in inetd mode you should use an inetd server

# that allows you to limit maximum number of processes per service

# (such as xinetd)

MaxInstances                    20

...

Main configuration directives

  • ServerName: Specifies the name of the FTP server. This name will be displayed when clients connect to the server.
  • DefaultRoot: Controls the default root directory assigned to a user upon login.
  • MaxInstances: The maximum number of simultaneous connections you want to allow on your FTP server.

Now, we have to change the ServerName.

ServerName : the name of your FTP server

NoteBy default, someone who connects to the FTP server can access all of the server folders, so it’s recommended to enable the option DefaultRoot.

DefaultRoot                     ~ !adm

After the configuration has been changed, restart the server.

sudo service proftpd restart

NoteIf an error line is displayed as “unable to resolve host“, be aware that it does not matter and you can ignore it.

Add an FTP user

Add a user.

useradd --shell /bin/false myuser

Create the home directory of our user “myuser“.

mkdir /home/myuser

Change the ownership of that directory to the user and group “myuser“.

chown myuser:myuser /home/myuser/

Set a password for the user “myuser“.

passwd myuser
]]>
https://support.aklwebhost.com/knowledgebase/install-an-ftp-server-with-proftpd-on-centos-6-or-centos-7/feed/ 0