about photos bookshelf portfolio blog home
Begin main content

Leopard Amazon S3 network storage

Ok so I'll write this up better later, but here are the steps I followed to successfully mount an Amazon's S3 network storage bucket under Leopard:

  1. create an amazon web services account
  2. sign up for amazon S3
  3. download MacOS X S3 Browser
  4. install MacFUSE Core for OSX 10.5
  5. get your Amazon S3 key ID & secret (you'll get an email from Amazon with an url about that after signing up)
  6. login and create an Amazon S3 bucket using the S3 Browser you downloaded (I called my bucket "12inch-timemachine" for backing up my 12" Powerbook)
  7. download s3fs.cpp from the s3fs project
  8. you'll need to add the following line to the top of the file somewhere:
    #define __off_t off_t
    (props to Roberto Saccon for figuring this out)
  9. compile s3fs.cpp with the following incantation:
    g++ -Wall -D__FreeBSD__=10 -D_FILE_OFFSET_BITS=64 -I/usr/local/include/fuse -L/usr/local/lib -lfuse -pthread -lcurl -lcrypto `xml2-config --cflags --libs` -ggdb s3fs.cpp -o s3fs
  10. create the file /etc/passwd-s3fs with your amazon s3 key id and secret separated by a colon ie:
    example-id:example-secret-key (note that you'll want to be careful about the permissions on this file)
  11. mount the S3 bucket as an OSX directory like so eg:
    mkdir ~/s3
    ./s3fs your-bucket-name ~/s3 -ovolname=Flubber
    where Flubber can be whatever you want the mounted volume to appear named as
  12. you can now access the mounted volume at your mount point (in the above example ~/s3) or as a Finder Volume which you can see by going to "Computer" in the Finder's "Go" menu. Not sure why it doesn't show up in the Sidebar)

Update: It seems Leopard, by default, doesn't show network volumes on the desktop by default. You can turn that on in finder preferences, but your volume still won't show up in the sidebar (under either Devices or Shared). A simple solution is to us the local option like so:

./s3fs your-bucket-name ~/s3 -olocal,volname=Flubber
Unfortunately that still doesn't allow it to work with time machine. You also get a folder icon on the desktop instead of a disk icon, but it's in the sidebar under Devices now. The icon even has a working eject icon which is handy, but it leaves an annoying folder icon in the sidebar.

Update 2: the ping_diskarb option seems to help keeping the Devices icon current:

./s3fs your-bucket-name ~/s3 -olocal,ping_diskarb,volname=Flubber

Update 3: The previous must be in my imagination:

On Mac OS X 10.5.x, both these options [ping_diskarb, noping_diskarb] are no-ops

08:18 PM, 28 Oct 2007 by Mark Aufflick Permalink

Installing with Mac Ports

Howdy Mark! I also found that s3fs builds very well if you have MacPorts installed. This is what I did: $ sudo port install macfuse $ mkdir -p ~/Projects $ cd !$ $ svn checkout http://s3fs.googlecode.com/svn/trunk/s3fs s3fs $ cd !$ $ make $ sudo cp s3fs /opt/local/bin/. Then I edited the /etc/passwd-s3fs file and entered my credentials. --gordon

by Unregistered Visitor on 09/26/08

Add comment