APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

mount_ftp


© December 2005 Tony Lawrence

You probably know that if you do Apple-K in the Finder, you can type in an ftp address (ftp://...) and then point and click your way through a public ftp server. You can do the same thing at the command line with "mount_ftp":

 mount_ftp ftp://foo.bar.com ~/desktop/foobar
 
 

You can then copy files from ~/desktop/fobar. "ls ~/desktop/foobar" and so on. Of course it's not really mounted in the traditional sense, but the illusion is maintained and as far as any program or script is concerned, this is just a rather slow directory.

You can eject the volume from Finder or use "umount":

 umount ~/desktop/foobar
 
 

However, it's possible to get umount confused. I did this:

 mount_ftp ftp://foo.bar.com /tmp/b
 
 

On OS X, /tmp/is a symbolic link, so the mount shows up like this:

 ftp://ftp.foo-bar.com on private/tmp/b (nodev, nosuid, read-only, mounted by tony)
 
 

That works (I changed the actual name here), but it won't unmount:

 2.05b$ umount /tmp/b
 umount: /private/tmp/b: not currently mounted
 2.05b$ cd
 2.05b$ umount private/tmp/b
 umount: unmount(private/tmp/b): No such file or directory
 2.05b$ umount /private/tmp/b
 umount: /private/tmp/b: not currently mounted
 2.05b$ cd /
 2.05b$ umount private/tmp/b
 umount: /private/tmp/b: not currently mounted
 2.05b$ umount -a -t ftp -v
 2.05b$ umount ftp://foo-bar.com
 umount: ftp://foo-bar.com: not currently mounted
 
 

The Finder couldn't eject it either. The only way to unmount was to do this:

 2.05b$ cd /
 2.05b$ umount -f private/tmp/b
 
 

The "-f" is necessary, as is the "cd /". Note that "umount -f /private/tmp/b" won't work: I had to be in / and "umount -f private/tmp/b".


Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> mount_ftp

1 comment


Inexpensive and informative Apple related e-books:

Take Control of IOS 11

Take control of Apple TV, Second Edition

Take Control of Pages

Photos: A Take Control Crash Course

El Capitan: A Take Control Crash Course




More Articles by © Tony Lawrence






Thu Apr 19 18:34:31 2007: 2963   anonymous


Thanks for the tip... figuring out how to unmount the FTP mount-point. had been bugging me for a while.

------------------------


Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





The primary duty of an exception handler is to get the error out of the lap of the programmer and into the surprised face of the user. (Verity Stob)




Linux posts

Troubleshooting posts


This post tagged:



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode





SCO Unix Sales, Support, & Service

Phone:  707-SCO-UNIX (707-726-8649Toll Free: 833-SCO-UNIX (833-726-8649)
www.SCOsales.com