ubuntu下设置ftp

OS: ubuntu 12.04

# 安装vsftpd

apt-get install vsftpd

# 编辑 /etc/vsftpd.conf

listen=YES
#anonymous_enable=YES
local_enable=YES
write_enable=YES

anonymous_enable=NO  #默认是允许
dirmessage_enable=YES  # 允许进入文件夹
xferlog_enable=YES   # 允许 ftp 日志记录允许
connect_from_port_20=YES     # 允许使用20号端口作为数据传送端口
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem

# 设置ftp文件夹

mkdir -p /home/ftp/upload
chmod 755 /home/ftp


# 设置ftp用户

• 编辑 /etc/vsftpd.conf:
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list

• 设置ftp用户密码: passwd ftpuser
• 编辑 /etc/vsftpd.chroot_list:
ftpuser
• 重启vsftp服务: service vsftpd restart

### 15 replies ›

1. I wish to show my thanks to the writer just for bailing me out of this difficulty. After scouting throughout the world wide web and seeing strategies that were not beneficial, I assumed my life was gone. Living without the approaches to the difficulties you’ve solved by way of your report is a serious case, and those that could have badly affected my entire career if I hadn’t encountered your blog. Your own ability and kindness in handling every part was invaluable. I’m not sure what I would’ve done if I hadn’t encountered such a stuff like this. I can at this point look ahead to my future. Thank you so much for this impressive and sensible help. I will not hesitate to refer the sites to any person who needs assistance on this area.

2. I precisely had to appreciate you once more. I do not know what I would have carried out without those ways shared by you over my subject. Certainly was a difficult setting in my circumstances, however , understanding the very skilled technique you treated that forced me to cry for contentment. I’m just happier for your support and as well , trust you realize what an amazing job you were doing educating many people thru your blog post. I know that you have never got to know any of us.

3. Thanks so much for providing individuals with an extremely special possiblity to read articles and blog posts from this web site. It’s usually very superb and stuffed with a good time for me and my office co-workers to search your site more than three times a week to learn the new issues you have. Not to mention, I’m just at all times contented with the attractive information you give. Certain 3 facts on this page are unequivocally the most beneficial we’ve had.

4. I am only commenting to make you be aware of what a extraordinary discovery my child undergone reading through the blog. She even learned numerous pieces, which included what it’s like to possess a wonderful helping mindset to make a number of people really easily fully grasp some hard to do issues. You undoubtedly did more than readers’ expected results. Many thanks for displaying the helpful, healthy, informative and as well as unique thoughts on this topic to Mary.

5. I have to show appreciation to you for bailing me out of such a difficulty. Just after searching through the the net and coming across ideas which are not pleasant, I assumed my life was gone. Existing minus the solutions to the problems you have solved as a result of this blog post is a critical case, as well as ones which could have in a negative way affected my career if I hadn’t encountered your blog. Your primary capability and kindness in taking care of all the details was precious. I am not sure what I would have done if I hadn’t come upon such a stuff like this. I can also at this point look forward to my future. Thank you so much for the impressive and amazing guide. I won’t hesitate to endorse your web blog to any individual who needs to have counselling on this subject matter.

7. I wanted to compose you that little bit of observation just to give many thanks once again just for the fantastic tricks you’ve contributed in this case. It was quite extremely open-handed of people like you to supply easily what exactly a number of people could have offered for an ebook to generate some profit for themselves, primarily considering the fact that you might well have done it if you ever considered necessary. The tactics also acted to become easy way to be aware that some people have similar desire the same as my very own to know the truth somewhat more on the topic of this condition. I’m certain there are several more fun occasions in the future for those who go through your blog.

8. I would like to voice my love for your kindness supporting those people that have the need for help on this important subject. Your special commitment to passing the solution all over was astonishingly advantageous and have truly empowered many people much like me to arrive at their pursuits. Your own valuable help implies a great deal to me and especially to my mates. Thanks a ton; from everyone of us.

9. I want to voice my respect for your kind-heartedness supporting those who really need assistance with in this situation. Your real commitment to getting the message up and down has been exceedingly important and have constantly allowed most people much like me to get to their dreams. Your own insightful information means a whole lot a person like me and even more to my mates. Warm regards; from everyone of us.

10. I precisely wished to say thanks once more. I am not sure the things I would’ve tried in the absence of those ways documented by you regarding such a area. It had been an absolute troublesome case for me personally, however , viewing the very professional manner you processed the issue forced me to weep over joy. I am happy for your information and thus have high hopes you comprehend what an amazing job you were doing educating the mediocre ones thru your webpage. Most likely you have never got to know all of us.

11. I am writing to let you understand of the notable encounter my wife’s daughter enjoyed checking your site. She figured out lots of pieces, which include how it is like to have a very effective coaching style to have a number of people with ease thoroughly grasp various tricky subject areas. You really surpassed our expectations. Thanks for rendering these priceless, dependable, informative and also easy tips on your topic to Julie.

12. I simply wanted to thank you very much all over again. I am not sure the things I would have made to happen without the information shown by you regarding this concern. It was the frustrating situation in my opinion, however , coming across a new expert strategy you processed that took me to jump over gladness. Now i am happier for the advice and as well , pray you realize what a great job that you are providing training people today by way of your webblog. Most probably you haven’t met all of us.

13. I am also commenting to make you know of the helpful discovery my cousin’s daughter gained studying your web page. She even learned some things, with the inclusion of what it’s like to have an ideal coaching nature to make many people effortlessly thoroughly grasp certain extremely tough matters. You undoubtedly surpassed visitors’ desires. Thank you for offering those great, trustworthy, edifying as well as fun guidance on that topic to Jane.

14. I would like to voice my admiration for your generosity giving support to persons who should have assistance with this theme. Your real commitment to getting the solution across appeared to be astonishingly effective and have consistently made girls like me to realize their aims. Your amazing warm and helpful help entails a lot a person like me and further more to my office colleagues. Thanks a ton; from everyone of us.

15. I really wanted to post a quick remark to thank you for the awesome advice you are sharing at this website. My time consuming internet research has now been paid with brilliant information to share with my classmates and friends. I would say that we visitors are unequivocally fortunate to live in a fantastic site with very many outstanding people with helpful principles. I feel very blessed to have used your entire webpage and look forward to some more amazing times reading here. Thanks a lot once more for a lot of things.