Title: BackWPUp S3 causing errors when open_base_dir is active
Last modified: July 31, 2023

---

# BackWPUp S3 causing errors when open_base_dir is active

 *  [Krzysiek Dróżdż](https://wordpress.org/support/users/drozdz/)
 * (@drozdz)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/backwpup-s3-causing-errors-when-open_base_dir-is-active/)
 * **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](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ż](https://wordpress.org/support/users/drozdz/)
 * (@drozdz)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/backwpup-s3-causing-errors-when-open_base_dir-is-active/#post-16934973)
 * You can easily fix this with one line of code in file class-s3-destination.php:
   266
 *     ```wp-block-code
       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.
 *  [happyAnt](https://wordpress.org/support/users/duongcuong96/)
 * (@duongcuong96)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/backwpup-s3-causing-errors-when-open_base_dir-is-active/#post-16956870)
 * Hello [@drozdz](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/backwpup/assets/icon-256x256.png?rev=3236141)
 * [BackWPup – WordPress Backup & Restore Plugin](https://wordpress.org/plugins/backwpup/)
 * [Support Threads](https://wordpress.org/support/plugin/backwpup/)
 * [Active Topics](https://wordpress.org/support/plugin/backwpup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/backwpup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/backwpup/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [happyAnt](https://wordpress.org/support/users/duongcuong96/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/backwpup-s3-causing-errors-when-open_base_dir-is-active/#post-16956870)
 * Status: not a support question