Skip to content

OCC does not see S3 directory when created via AWS CLI #30761

@ghost

Description

Steps to reproduce

  1. Install AWS CLI for python:
    pip install awscli
  2. Configure AWS CLI
    aws configure
  3. Create temp dir and copy it to s3
    mkdir /tmp/test ; echo 123 > /tmp/test/1
    aws s3 cp /tmp/test s3:///test --recursive
  4. Run OCC
    sudo -u php-fpm occ files:scan --path=/admin/files/AmazonS3/ -vvv

Expected behaviour

OCC should return all directories in bucket

Actual behaviour

When using aws cli to copy directory to s3 bucket, OCC does not see it while using files:scan.
However when I access AWS CONSOLE (website), create directory and upload files - OCC can see it.

Server configuration

CentOS 7

Web server:
Nginx

Database:
Default

PHP version:
56u (IUS)

ownCloud version: (see ownCloud admin page)
10.0.4

Updated from an older ownCloud or fresh install:
Fresh

Where did you install ownCloud from:
Official source

Signing status (ownCloud 9.0 and above):

No errors have been found.

The content of config/config.php:

{
"system": {
"updatechecker": false,
"instanceid": "ocdv9dkx8l66",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"example.com:10080"
],
"datadirectory": "/var/www/owncloud/data",
"overwrite.cli.url": "https://example.com10080",
"dbtype": "sqlite3",
"version": "10.0.4.4",
"logtimezone": "UTC",
"installed": true
}
}

List of activated apps:

Enabled:

  • comments: 0.3.0
  • configreport: 0.1.1
  • dav: 0.3.2
  • federatedfilesharing: 0.3.1
  • federation: 0.1.0
  • files: 1.5.1
  • files_external: 0.7.1
  • files_sharing: 0.10.1
  • files_trashbin: 0.9.1
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • market: 0.2.3
  • notifications: 0.3.2
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • templateeditor: 0.1
  • updatenotification: 0.2.1
    Disabled:
  • encryption
  • external
  • theme-example
  • user_external

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

Are you using encryption: yes/no
NO

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

Client configuration

Browser:
Chrome

Operating system:
Fedora 27

Logs

Web server error log

None

ownCloud log (data/owncloud.log)

Exception during scan: ErrorException: Undefined index: size
#0 /var/www/owncloud/lib/private/Files/Cache/Scanner.php(421): OCA\Files\Command\Scan->exceptionErrorHandler(8, 'Undefined index...', '/var/www/ownclo...', 421, Array)
#1 /var/www/owncloud/lib/private/Files/Cache/Scanner.php(382): OC\Files\Cache\Scanner->handleChildren('', true, 3, '16', true, 299044)
#2 /var/www/owncloud/lib/private/Files/Cache/Scanner.php(316): OC\Files\Cache\Scanner->scanChildren('', true, 3, 16, true)
#3 /var/www/owncloud/lib/private/Files/Utils/Scanner.php(238): OC\Files\Cache\Scanner->scan('', true, 3)
#4 /var/www/owncloud/apps/files/lib/Command/Scan.php(224): OC\Files\Utils\Scanner->scan('/admin/files/Am...', false)
#5 /var/www/owncloud/apps/files/lib/Command/Scan.php(310): OCA\Files\Command\Scan->scanFiles('admin', '/admin/files/Am...', true, Object(Symfony\Component\Console\Output\ConsoleOutput), false, false)
#6 /var/www/owncloud/lib/composer/symfony/console/Command/Command.php(262): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/owncloud/core/Command/Base.php(159): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/owncloud/lib/composer/symfony/console/Application.php(826): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/owncloud/lib/composer/symfony/console/Application.php(189): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/owncloud/lib/composer/symfony/console/Application.php(120): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/owncloud/lib/private/Console/Application.php(162): Symfony\Component\Console\Application->run(NULL, NULL)
#12 /var/www/owncloud/console.php(106): OC\Console\Application->run()
#13 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#14 {main}

Browser log

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions