You are hereBlogs / xavier's blog / ติดตั้ง FTP Server ด้วย Proftpd
ติดตั้ง FTP Server ด้วย Proftpd
PCLinuxOS มีแพคเกจสำหรับ FTP อยู่หลายตัวเช่น ftp-server, aftp-server และ proftpd เราจะเลือกใช้ proftpd การติดตั้งใช้ apt หรือ synaptic ก็ได้
# apt-get install proftpd
เมื่อติดตั้งเสร็จแล้วให้ start service ด้วยคำสั่ง
# /etc/init.d/proftpd start
ตรวจสอบ service ว่าได้เปิดจริงหรือไม่โดยใช้ nmap localhost หรือ netstat -tap หาก start serviceได้สำเร็จจะพบว่ามี service ftp และ port 21 เปิดอยู่
# nmap localhostStarting Nmap 4.20 ( http://insecure.org ) at 2007-10-03 08:11 ICTInteresting ports on xavier.redlinesoft.net (127.0.0.1):Not shown: 1692 closed portsPORT STATE SERVICE21/tcp open ftp111/tcp open rpcbind139/tcp open netbios-ssn445/tcp open microsoft-ds631/tcp open ipp
ทดสอบ ftp โดยใช้คำสั่ง ftp หรือจากโปรแกรมไคลเอนอื่นๆ หาก ftp ได้จะพบว่าผู้ใช้สามารถกระโดดไปยังไดเรคทอรีอื่นๆ ได้ ให้แก้ไขไฟล์ /etc/proftpd.conf ไปยังบรรทัดที่มีคำว่า
#DefaultRoot ~
เอาเครื่องหมาย # หน้า DefaultRootออกจากนั้น restart service อีกครั้ง
# /etc/init.d/proftpd restart
ลองทดสอบดูอีกรอบ จะพบว่าผู้ใช้กระโดดไปไหนไม่ได้แล้ว สำหรับ proftpd จะอ้างอิงชื่อผู้ใช้และรหัสผ่านในระบบและไดเรคทอรีส่วนตัวของแต่ละคนอยู่ที่ /home/username เป็นสัดส่วนมีระเบียบเรียบร้อย
หากต้องการตั้งค่าให้ proftpd เริ่มต้นทุกครั้งที่เปิดเครื่องให้ตั้งค่าที่ Start > System > Configuration > Config Your Computer เลือก tab System > Enable or disable the system services หาชื่อ service Proftpd ติ๊กเครื่องหมายถูกตรง On boot เท่านั้นครับ
จบครับ
- xavier's blog
- Login or register to post comments
