I am using Advagg and Amazons3 Module, which is causing this error:

temporary://fileh4Oxvi could not be copied, because the destination directory is not properly configured.

Files are getting created in "tmp" folder but that has been not copied to s3 bucket.

I had given the "tmp" folder 755 and even 777, which is not working. And I even tried Configuring the temporary directory, which is not working even.

Any inputs are really appreciated.

  • The destination directory is the directory where the file is being copied. You need to check where the file is copied, which normally is the public file system directory, but it could be any directory. Which one is up to the module that is trying to copy the file. I would check what the Amazons3 module does.
    – apaderno
    Commented Dec 6, 2021 at 8:13

1 Answer 1


...could not be copied, because the destination directory...

The temp folder is the source in this context, Drupal is complaining that the destination is not writable.

You need to make your public file system (usually sites/default/files) writable by the web server user.

  • I tried with 755 and even 777, both generates the same error.
    – NTT
    Commented Jul 25, 2017 at 9:02
  • 2
    If your web server can definitely write to both the /tmp folder and the destination folder, the problem is something server-specific that would need more information to be able to help solve. Don't use 777 by the way, set up proper users/groups instead and use 755/644 or whatever makes sense for your setup
    – Clive
    Commented Jul 25, 2017 at 9:05

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