• Warning: is_readable(): open_basedir restriction in effect. File(/.aws/config) is not within the allowed path(s): (/home/***/domains/***:/tmp:/var/tmp:/home/***/.tmp:/home/***/.php:/usr/local/php:/opt/alt:/etc/pki) in?/home/***/domains/***/public_html/wp-content/plugins/backwpup/vendor/aws/aws-sdk-php/src/DefaultsMode/ConfigurationProvider.php?on line?152

    The backups also are not sent to AWS.

    And the problem is pretty abvious, since you’re trying to get config from file that is not accessible by the scirpt.

    Solution also is pretty obvious and clearly described in AWS SDK:

    https://github.com/aws/aws-sdk-php/issues/2303

    You should set:

    ‘use_aws_shared_config_files’ => false,

    when creating new Aws\S3\S3Client object.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Krzysiek Dró?d?

    (@drozdz)

    You can easily fix this with one line of code in file class-s3-destination.php:266

    public function client($accessKey, $secretKey): S3Client
        {
            $s3Options = [
                'signature' => $this->signature(),
                'credentials' => [
                    'key' => $accessKey,
                    'secret' => BackWPup_Encryption::decrypt($secretKey),
                ],
                'region' => $this->region(),
                'http' => [
                    'verify' => BackWPup::get_plugin_data('cacert'),
                ],
                'version' => $this->version(),
                'use_path_style_endpoint' => $this->onlyPathStyleBucket(),
                'use_aws_shared_config_files' => false,  // <-- THIS LINE WAS ADDED
            ];
    
            if ($this->endpoint()) {
                $s3Options['endpoint'] = $this->endpoint();
                if (!$this->region()) {
                    $s3Options['bucket_endpoint'] = true;
                }
            }
    
            $s3Options = apply_filters('backwpup_s3_client_options', $s3Options);
    
            return new S3Client($s3Options);
        }

    Yes, we can use backwpup_s3_client_options filter for that, but it’s pretty annoying workaround and not a solution.

    Plugin Support happyAnt

    (@duongcuong96)

    Hello @drozdz

    thank you so much for the report, i already forwared this to our team few days ago and the team are checking right now! will update you when I have something new!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘BackWPUp S3 causing errors when open_base_dir is active’ is closed to new replies.