Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author imthiaz

    (@imthiaz)

    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

    (@tsuvik)

    Thanks. Will try out and let you know ??

    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;

    imthiaz, I believe you should be using the 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.