1, the establishment of users and groups, set user folder:
sudo groupadd ftpusers
sudo useradd -d / www / server / long -g ftpusers -s / sbin / nologin long # establishment of users and directories used by the user.
sudo passwd long # set the user password.
sudo mkdir / www / server / long # establishment of the user directory, no directory, users can not access.
sudo chmod -rxw longg
sudo chmod u = rwx long # This step can not be less, just to give permission to the owner of the directory. All other users have no access to read and write permissions to other users to hide folders.
2, is provided and connected to the access speed of the user:
MaxInstances 30
MaxClientsPerHost 4
MaxClientsPerUser 4
MaxHostsPerUser 6
AllowRetrieveRestart is
AllowStoreRestart on
TransferRate RETR 2000
Transfer Rate 1000 GRAND
TransferRate RETR 800:1028400000 user down
3, add a user login and directory permissions:
<Directory /www/server/*>
<Limit LOGIN>
DenyAll
</Limit>
HideNoAccess on # hide the user can not access the directory listing <<<<<<<<<<
AllowOverwrite on
</Directory>
DefaultRoot / www / server / # shunting the root user, do not visit each other, it can be changed to: DefaultRoot ~.
<Limit SITE_CHMOD>
DenyAll
</Limit>
<Directory /www/server/long/>
<Limit SITE_CHMOD>
AllowUser long
DenyAll
</Limit>
AllowOverwrite on
</Directory>
# Close the reverse lookup client operated by the user name ( RFC1413 ), a faster connection
IdentLookups off
# Close the DNS reverse lookup (Also for faster response)
UseReverseDNS off