Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use s3cmd to copy a full bucket down to my local machine like so:

s3cmd -c .s3cfg-bespoke sync s3://my_bucket/ ~/local_folder/

There are three folders and a smattering of files in the bucket. The first folder and it's contents are copied without issue, but the second folder throws an error before anything is transferred:

Problem: OSError: [Errno 21] Is a directory: '/home/me/local_folder/images/'

Traceback (most recent call last):
  File "/usr/bin/s3cmd", line 1736, in <module>
  File "/usr/bin/s3cmd", line 1681, in main
  File "/usr/bin/s3cmd", line 1070, in cmd_sync
    return cmd_sync_remote2local(args)
  File "/usr/bin/s3cmd", line 889, in cmd_sync_remote2local
    raise e
OSError: [Errno 21] Is a directory: '/home/me/local_folder/images/'

I've tried using the --recursive switch but it doesn't affect the outcome. I've been through the manpage and no other options seem like they would help.

Am I doing something wrong in the command? Or have I stumbled across a genuine bug?

share|improve this question
up vote 3 down vote accepted

From Amazon aws forum:

s3cmd -c .s3cfg-bespoke --rexclude "/$" sync s3://my_bucket/ ~/local_folder/
share|improve this answer
--rexclude "/$" – Ryu_hayabusa Oct 7 '14 at 17:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.