Setting up a new installation on EC2 with S3 as Primary plugin: failing to connect

Steps to reproduce

  • Simply load the URL

Expected behavior

  • I set up a new OwnCloud installation on EC2 through RunCloud, I expected OwnCloud to run.

Actual behaviour

Your Data directory is invalid Please check that the data directory contains a file ".ocdata" in its root.

  • I believe that I have OwnCloud set up correctly.
  • I downloaded the files_primary_s3 plugin from the community plugins, uploaded the zip to /apps, extracted it, then CHMOD’d to the correct user.
  • I added the new config to the config.php file, then attempted to visit my public URL to complete installation and login.
  • Since I received the above error I reached out to AWS support. I installed the AWS cli on the OwnCloud server, in the same folder as OwnCloud, then with the help of the tech I was able to successfully copy a file from the sever to the bucket. (I had to update my IAM user access policy as I had set it up to only allow access to the FILES within the bucket, not the bucket itself.)
  • Since I was able to cp a file from the server to S3 I now KNOW that it is possible for my server to access the bucket. BUUUUTTTTT, OwnCloud is telling me that my Data directory is incorrect.

Please help me get this set up, I have to move ~1TB of data from another server here, and would like to have that done before the end of the year. THANK YOU!

Server configuration

Operating system:

  • Ubuntu 22.04

Web server:

  • Apache with NGINx


  • Maria, UTF8MB4

PHP version:

  • 7.4

ownCloud version: (see ownCloud admin page)

  • 10.11

Updated from an older ownCloud or fresh install:

  • Fresh

Where did you install ownCloud from:

  • GitHub

The content of config/config.php:

$CONFIG = array(
    'passwordsalt' => '***hidden***',
    'secret' => '***hidden***',
    'trusted_domains' => array(
        0 => 'localhost',
        1 => '***hidden***.com',
    ) ,
    'datadirectory' => '/***hidden***/owncloud/owncloud_data',
    'overwrite.cli.url' => 'http://localhost',
    'dbtype' => 'mysql',
    'version' => '',
    'dbname' => '***hidden***',
    'dbhost' => 'localhost',
    'dbtableprefix' => 'oc_',
    'mysql.utf8mb4' => true,
	'dbuser' => '***hidden***',
	'dbpassword' => '***hidden***',
    'allow_user_to_change_mail_address' => '',
    'logtimezone' => 'UTC',
    'objectstore' => [
	    'class' => 'OCA\Files_Primary_S3\S3Storage',
	    'arguments' => [
	        'bucket' => '***hidden***',
	        'availableStorage' => 1099511627776,
	        'part_size' => 5242880,
	        'concurrency' => 5,
	        'options' => [
	            'version' => '2006-03-01',
	            'region' => 'us-west-1',
	            'credentials' => [
					'key' => '***hidden***',
	          		'secret' => '***hidden***',
	            ] ,
	        ] ,
	    ] ,
    'apps_paths' => array(
        0 => array(
            'path' => '/***hidden***/owncloud/public_html/apps',
            'url' => '/apps',
            'writable' => false,
        ) ,
        1 => array(
            'path' => '/***hidden***/owncloud/public_html/apps-external',
            'url' => '/apps-external',
            'writable' => true,
        ) ,
    ) ,
    'installed' => true,
    'instanceid' => '***hidden***',

List of activated apps:

  • None

Are you using external storage, if yes which one: local/smb/sftp/…

  • s3_as_primary

Are you using encryption:

  • no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…

  • no

Client configuration


  • Safari (but it doesn’t really matter)

Operating system:

  • MacOS


Web server error log

ownCloud log (data/owncloud.log)

Browser log

Anyone have any thoughts?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.