Sudo user<\/a>.<\/li>\n<\/ul>\n\n\n\nInstallation<\/h2>\n\n\n\n
Update the system.<\/p>\n\n\n\n
sudo apt-get update\n\nsudo apt-get dist-upgrade\n<\/code><\/pre>\n\n\n\nInstall proftpd<\/code>.<\/p>\n\n\n\nsudo apt-get install proftpd\n<\/code><\/pre>\n\n\n\nDuring installation, you will be asked if you want to install in inetd<\/code> or standalone<\/code> mode. Choose the standalone<\/code> mode.<\/p>\n\n\n\nConfiguration<\/h2>\n\n\n\n
Open the Proftpd configuration file.<\/p>\n\n\n\n
sudo nano \/etc\/proftpd\/proftpd.conf\n<\/code><\/pre>\n\n\n\nThe file will resemble the following text.<\/p>\n\n\n\n
#\n\n# \/etc\/proftpd\/proftpd.conf -- This is a basic ProFTPD configuration file.\n\n# To really apply changes, reload proftpd after modifications, if\n\n# it runs in daemon mode. It is not required in inetd\/xinetd mode.\n\n#\n\n\n\n# Includes DSO modules\n\nInclude \/etc\/proftpd\/modules.conf\n\n\n\n# Set off to disable IPv6 support which is annoying on IPv4 only boxes.\n\nUseIPv6 on\n\n# If set on you can experience a longer connection delay in many cases.\n\nIdentLookups off\n\n\n\nServerName \"Debian\"\n\nServerType standalone\n\nDeferWelcome off\n\n\n\nMultilineRFC2228 on\n\nDefaultServer on\n\nShowSymlinks on\n\n\n\nTimeoutNoTransfer 600\n\nTimeoutStalled 600\n\nTimeoutIdle 1200\n\n\n\nDisplayLogin welcome.msg\n\nDisplayChdir .message true\n\nListOptions \"-l\"\n\n\n\nDenyFilter \\*.*\/\n\n\n\n# Use this to jail all users in their homes\n\n# DefaultRoot ~\n\n\n\n# Users require a valid shell listed in \/etc\/shells to login.\n\n# Use this directive to release that constrain.\n\nRequireValidShell off\n\n\n\n# Port 21 is the standard FTP port.\n\nPort 21\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\nTimeoutIdle<\/code>: The time, in seconds, after which a client is automatically disconnected if it is no longer active on the FTP server.<\/li>\n\n\n\nDefaultRoot<\/code>: Controls the default root directory assigned to a user upon login.<\/li>\n\n\n\nPort<\/code>: The connection port to the FTP server. Almost all of the time this port is 21<\/code> and you should not have to change it unless you are blocked by a firewall.<\/li>\n\n\n\nPassivePorts<\/code>: Restricts the range of ports from which the server will select when sent the PASV<\/code> command from a client.<\/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 activate the DefaultRoot<\/code> option. to do this, find the DefaultRoot<\/code> commented line and uncomment it.<\/p>\n\n\n\nDefaultRoot ~\n<\/code><\/pre>\n\n\n\nThe value ~<\/code> means that the user will be limited to the personal folder (e.g \/home\/user12<\/code>).<\/p>\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>.<\/p>\n\n\n\nChange the ServerName<\/code>.<\/p>\n\n\n\nServerName : the name of your FTP server\n<\/code><\/pre>\n\n\n\nFind and uncomment the following lines (removing the #<\/code> at the beginning of each line) to allow anonymous connections to your server.<\/p>\n\n\n\n# A basic anonymous configuration, no upload directories.\n\n\n\n <Anonymous ~ftp>\n\n User ftp\n\n Group nogroup\n\n # We want clients to be able to login with \"anonymous\" as well as \"ftp\"\n\n UserAlias anonymous ftp\n\n # Cosmetic changes, all files belongs to ftp user\n\n DirFakeUser on ftp\n\n DirFakeGroup on ftp\n\n\n\n RequireValidShell off\n\n\n\n # Limit the maximum number of anonymous logins\n\n MaxClients 10\n\n\n\n # We want 'welcome.msg' displayed at login, and '.message' displayed\n\n # in each newly chdired directory.\n\n DisplayLogin welcome.msg\n\n DisplayFirstChdir .message\n\n\n\n # Limit WRITE everywhere in the anonymous chroot\n\n <Directory *>\n\n <Limit WRITE>\n\n DenyAll\n\n <\/Limit>\n\n <\/Directory>\n\n <\/Anonymous>\n<\/code><\/pre>\n\n\n\nNote<\/strong>: If you enable anonymous connections on your FTP server, any user can connect to it. They will have access to the \/home\/ftp<\/code> directory and will be able to read and download files, but not modify or add files.<\/p>\n\n\n\nYou can forbid the root user from accessing FTP by adding the following line.<\/p>\n\n\n\n
RootLogin off\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”, be aware that it does not matter and you can ignore it.<\/p>\n\n\n\nAdd an FTP user<\/h2>\n\n\n\n
Add a user, for example, “myuser<\/code>“.<\/p>\n\n\n\nuseradd --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":[233,242,245,247],"manual_kb_tag":[592],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/3768"}],"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=3768"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/3768\/revisions"}],"predecessor-version":[{"id":3769,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/3768\/revisions\/3769"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=3768"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=3768"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=3768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}