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


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.

1 comment

Increase ad revenue 50-250% with Ezoic

More Articles by

Find me on Google+

© 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.

Kerio Samepage

Have you tried Searching this site?

Support Rates

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

The history of the world teaches us that succession is dangerous and that the strong take what they want. It's not likely to be any different with Linux. (Tony Lawrence)

This post tagged: