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.
- brew install vsfptd
- sudo chown /usr/local/etc/vsftpd.conf add to end following config
chown_username=name # to match your username
secure_chroot_dir=/Users/name/ftp # ftp root folder
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.