FTP from the Mac Terminal – how do you fix the “Is a directory” error?


We were playing around with the Terminal on the Mac to FTP some things over to an FTP site.

After we had FTP’d to our site, we had tried running this command:

put  /Users/vg/picture.jpg  /programmerinterview/

But, then we got this error:

Error: /programmerinterview: Is a directory.

We then realized that the reason we got this error is because we had to specify the filename that we wanted the file to have on the server that we were FTP-ing to. We were thinking that it would be smart enough to know that we wanted “picture.jpg” to have the same name on the FTP site under the /programmerinterview directory, but we were wrong.

So, we ran this command:

put /Users/vg/picture.jpg  /programmerinterview/picture.jpg

And it ran perfectly! Just another tip in case you ever encounter this problem!

Hiring? Job Hunting? Post a JOB or your RESUME on our JOB BOARD >>

Subscribe to our newsletter for more free interview questions.