Title: [Plugin: WordPress Amazon S3 Plugin] Directory not writable error
Last modified: August 19, 2016

---

# [Plugin: WordPress Amazon S3 Plugin] Directory not writable error

 *  [tsuvik](https://wordpress.org/support/users/tsuvik/)
 * (@tsuvik)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-s3-plugin-directory-not-writable-error/)
 * Hi, I keep getting “directory not writable” error.
    Can you tell me the exact
   permission that I have to use to solve this issue? Tried 644 and 744 but didnt
   work.I guess using 777 is hazardous.
 * [http://wordpress.org/extend/plugins/wp-s3/](http://wordpress.org/extend/plugins/wp-s3/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [imthiaz](https://wordpress.org/support/users/imthiaz/)
 * (@imthiaz)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-s3-plugin-directory-not-writable-error/#post-1569474)
 * You can edit this line and change to a folder which is outside public_html and
   give full 777 access to the folder
 * $this->s3CacheFolder = ABSPATH . ‘wp-content’ . DIRECTORY_SEPARATOR . ‘s3temp’.
   DIRECTORY_SEPARATOR;
 * To (It can be anything as per your file structure)
 * $this->s3CacheFolder = ‘/home/temp/s3temp’ . DIRECTORY_SEPARATOR;
 *  Thread Starter [tsuvik](https://wordpress.org/support/users/tsuvik/)
 * (@tsuvik)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-s3-plugin-directory-not-writable-error/#post-1569486)
 * Thanks. Will try out and let you know 🙂
 *  [trentscott1](https://wordpress.org/support/users/trentscott1/)
 * (@trentscott1)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-s3-plugin-directory-not-writable-error/#post-1569917)
 * This worked for me. I’ve also had success by creating the directory at wp-content/
   uploads/s3temp with permissions set to the Apache user and the following code
   changes:
 * In S3.PHP:
 * [FIND]
 * `$this->s3CacheFolder = ABSPATH . get_option ( 'upload_path', 'wp-content/uploads').
   DIRECTORY_SEPARATOR . 's3temp' . DIRECTORY_SEPARATOR;`
 * [REPLACE WITH]
 * `$this->s3CacheFolder = ABSPATH . 'wp-content/uploads' . DIRECTORY_SEPARATOR .'
   s3temp' . DIRECTORY_SEPARATOR;`
 *  [bobeagan](https://wordpress.org/support/users/bobeagan/)
 * (@bobeagan)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-s3-plugin-directory-not-writable-error/#post-1569937)
 * imthiaz, I believe you should be using the [wp_upload_dir()](http://codex.wordpress.org/Function_Reference/wp_upload_dir)
   function to determine this. The basedir and baseurl keys from the resulting array
   should give you the values that you are attempting to calculate.
 *     ```
       $uploads = wp_upload_dir();
       $this->s3CacheFolder = $uploads['basedir'] . DIRECTORY_SEPARATOR . 's3temp' . DIRECTORY_SEPARATOR;
       $this->mediaUrl = $uploads['baseurl'] . '/';
       $this->mediaPath = $uploads['basedir'] . DIRECTORY_SEPARATOR;
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: WordPress Amazon S3 Plugin] Directory not writable error’ is
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-s3.svg)
 * [Wordpress Amazon S3 Plugin](https://wordpress.org/plugins/wp-s3/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-s3/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-s3/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-s3/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-s3/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-s3/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [bobeagan](https://wordpress.org/support/users/bobeagan/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-s3-plugin-directory-not-writable-error/#post-1569937)
 * Status: not resolved