Skip to content

FileZilla FTP Server in Ubuntu Linux

mrolarik edited this page Aug 9, 2018 · 9 revisions

สำหรับการโอนย้ายไฟล์ (File Transfer) บน Linux นั้น เครื่อง Server จะต้องติดตั้งโปรแกรมเพื่อให้สามารถรับส่งไฟล์ผ่านโปรโตคอล FTP (File Transfer Protocol) โปรแกรมที่ใช้ในการโอนย้ายไฟล์คือ ** FileZilla Server **

Install a FTP server on Linux

  • เปิดโปรแกรม Terminal (ctrl+alt+T) เพื่อพิมพ์คำสั่งในการติดตั้ง
  • ให้ update ระบบด้วยการพิมพ์คำสั่ง
$ sudo apt-get update  
$ sudo apt-get upgrade
  • จากนั้นให้ติดตั้งโปรแกรม vsftpd โดยใช้คำสั่ง
  • vsftpd (Secure, fast FTP server for UNIX-like systems) รายละเอียดเพิ่มเติม https://security.appspot.com/vsftpd.html
$ sudo apt-get install vsftpd
  • ติดตั้งโปรแกรม FileZilla
$ sudo apt-get install filezilla

Configuring the FTP Server

  • เปิด Terminal และพิมพ์คำสั่ง
$ sudo nano /etc/vsftpd.conf
  • จากนั้นโปรแกรม nano จะเปิดไฟล์ vsftpd.conf ขึ้นมาเพื่อให้แก้ไข
  • สิ่งที่ต้องแก้ไขคือ อนุญาตให้ User สามารถล็อกอิน (Login) เข้าสู่ FTP Server และสามารถ upload ไฟล์ไปเก็บไว้ที่ Server โดยค้นหาข้อความ ดังต่อไปนี้
#local_enable=YES

และ

#write_enable=YES

ลบเครื่องหมาย (uncomment) # ออกไป ผลลัพธ์ที่ได้คือ

local_enable=YES

และ

write_enable=YES
  • กดปุ่ม ctrl+x และกด y เพื่อยืนยันการบันทึกไฟล์ ต้องลบเครื่องหมาย # (Uncomment)

  • หากใช้โปรแกรม Filezilla จากเครื่อง client เพื่อ upload ไฟล์มายังเครื่อง server จะเจอข้อผิดพลาด (error)

Response: 	550 Permission denied.

ทั้งนี้ เนื่องจากทุกครั้งหากแก้ไขไฟล์ config ของ vsftpd จะต้อง restart เซอร์วิสใหม่ทุกครั้ง

  • ดังนั้น ให้ restart เซอร์วิส (Service) ของ vsftpd โดยพิมพ์คำสั่ง
sudo service vsftpd restart

ตัวอย่างโปรแกรม FileZilla
FileZilla on Linux

Clone this wiki locally