vsftpd for Mac quick tutorial

Posted onLeave a commentCategories未分类

Scenario: I wanted to scan my visa from an office printer which supports FTP protocol to transfer the scanned image. So all I need is a FTP server running on my Mac that the network printer can connect to.

The first solution comes to my mind was to install a vsftpd service but the problem is I had no idea how to configure it, and of course I don’t want to read through the vsftpd documentation to master all the details. Then ironically it took me a hell lot of time to be mis-guided by other articles (for instance I created a mac user following the tutorials on internet which ended up for nothing…).

Anyway, here are all the steps necessary and just does the job.

  1. brew install vsfptd
  2. sudo chown /usr/local/etc/vsftpd.conf add to end following config

chown_uploads=YES
chown_username=name # to match your username
pam_service_name=vsftpd
write_enable=YES
secure_chroot_dir=/Users/name/ftp # ftp root folder
anon_upload_enable=YES
anonymous_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_root=/Users/name/ftp

3. mkdir /users/name/ftp/files # the folder to work with since root folder isn’t allowed to. Also to add sufficient permission like 777 to this folder.

4. sudo vsftpd # brew service start vsftpd won’t work for some reason.

5. try to connect with Filezilla client make sure it works. user name is anonymous with no password.

6. sudo ifconfig # to get the network ip address for printer to connect to.

发表评论

电子邮件地址不会被公开。 必填项已用*标注