yum check-update\n<\/code><\/pre>\n\n\n\nOfficial 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.<\/p>\n\n\n\n
CentOS 6<\/strong>:<\/p>\n\n\n\nsudo rpm -Uvh http:\/\/download.fedoraproject.org\/pub\/epel\/6\/i386\/epel-release-6-8.noarch.rpm\n<\/code><\/pre>\n\n\n\nCentOS 7<\/strong>:<\/p>\n\n\n\nsudo rpm -Uvh http:\/\/ftp.astral.ro\/mirrors\/fedora\/pub\/epel\/beta\/7\/x86_64\/epel-release-7-0.2.noarch.rpm\n<\/code><\/pre>\n\n\n\nDownload all of the metadata for the currently enabled yum repos.<\/p>\n\n\n\n
sudo yum makecache\n<\/code><\/pre>\n\n\n\nInstall proftpd<\/code>.<\/p>\n\n\n\nsudo yum install proftpd\n<\/code><\/pre>\n\n\n\nInstall ftp<\/code>.<\/p>\n\n\n\nsudo yum install ftp\n<\/code><\/pre>\n\n\n\nConfiguration<\/h3>\n\n\n\n
Open the ProFTPd configuration file.<\/p>\n\n\n\n
sudo nano \/etc\/proftpd.conf\n<\/code><\/pre>\n\n\n\nThe file will resemble the following text.<\/p>\n\n\n\n
The file will resemble the following text.\n\n# This is the ProFTPD configuration file\n\n#\n\n# See: http:\/\/www.proftpd.org\/docs\/directives\/linked\/by-name.html\n\n\n\n# Server Config - config used for anything outside a <VirtualHost> or <Global> $\n\n# See: http:\/\/www.proftpd.org\/docs\/howto\/Vhost.html\n\n\n\nServerName \"ProFTPD server\"\n\nServerIdent on \"FTP Server ready.\"\n\nServerAdmin root@localhost\n\nDefaultServer on\n\n\n\n# Cause every FTP user except adm to be chrooted into their home directory\n\n# Aliasing \/etc\/security\/pam_env.conf into the chroot allows pam_env to\n\n# work at session-end time (http:\/\/bugzilla.redhat.com\/477120)\n\nVRootEngine on\n\nDefaultRoot ~ !adm\n\nVRootAlias \/etc\/security\/pam_env.conf etc\/security\/pam_env$\n\n\n\n# Use pam to authenticate (default) and be authoritative\n\nAuthPAMConfig proftpd\n\nAuthOrder mod_auth_pam.c* mod_auth_unix.c\n\n# If you use NIS\/YP\/LDAP you may need to disable PersistentPasswd\n\n#PersistentPasswd off\n\n\n\n# Don't do reverse DNS lookups (hangs on DNS problems)\n\nUseReverseDNS off\n\n\n\n# Set the user and group that the server runs as\n\nUser nobody\n\nGroup nobody\n\n\n\n# To prevent DoS attacks, set the maximum number of child processes\n\n# to 20. If you need to allow more than 20 concurrent connections\n\n# at once, simply increase this value. Note that this ONLY works\n\n# in standalone mode; in inetd mode you should use an inetd server\n\n# that allows you to limit maximum number of processes per service\n\n# (such as xinetd)\n\nMaxInstances 20\n\n...\n<\/code><\/pre>\n\n\n\nMain configuration directives<\/h3>\n\n\n\n\nServerName<\/code>: Specifies the name of the FTP server. This name will be displayed when clients connect to the server.<\/li>\n\n\n\nDefaultRoot<\/code>: Controls the default root directory assigned to a user upon login.<\/li>\n\n\n\nMaxInstances<\/code>: The maximum number of simultaneous connections you want to allow on your FTP server.<\/li>\n<\/ul>\n\n\n\nNow, we have to change the ServerName<\/code>.<\/p>\n\n\n\nServerName : the name of your FTP server\n<\/code><\/pre>\n\n\n\nNote<\/strong>: By default, someone who connects to the FTP server can access all of the server folders, so it’s recommended to enable the option DefaultRoot<\/code><\/em>.<\/p>\n\n\n\nDefaultRoot ~ !adm\n<\/code><\/pre>\n\n\n\nAfter the configuration has been changed, restart the server.<\/p>\n\n\n\n
sudo service proftpd restart\n<\/code><\/pre>\n\n\n\nNote<\/strong>: If an error line is displayed as “unable to resolve host<\/code>“, be aware that it does not matter and you can ignore it.<\/em><\/p>\n\n\n\nAdd an FTP user<\/h2>\n\n\n\n
Add a user.<\/p>\n\n\n\n
useradd --shell \/bin\/false myuser\n<\/code><\/pre>\n\n\n\nCreate the home directory of our user “myuser<\/code>“.<\/p>\n\n\n\nmkdir \/home\/myuser\n<\/code><\/pre>\n\n\n\nChange the ownership of that directory to the user and group “myuser<\/code>“.<\/p>\n\n\n\nchown myuser:myuser \/home\/myuser\/\n<\/code><\/pre>\n\n\n\nSet a password for the user “myuser<\/code>“.<\/p>\n\n\n\npasswd myuser<\/code><\/pre>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[231,242,245],"manual_kb_tag":[591],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/3766"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=3766"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/3766\/revisions"}],"predecessor-version":[{"id":3767,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/3766\/revisions\/3767"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=3766"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=3766"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=3766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}