Exception during scan: ErrorException: Undefined offset: 0


#1

Steps to reproduce

Hello, I’m french, sorry if my english is bad or if don’t understand every thing.
I don’t find ansower on web.
My data are uploaded on FTP with External Storage: FTP.
When the data change on FTP the owncloud are not update.
I find un cmd line but I have this error :

sudo -u www-data php occ files:scan dlt

Exception during scan: ErrorException: Undefined offset: 0

Thank you very much for your help.

Emile

Expected behaviour

Sync FTP data to owncloud

Actual behaviour

No sync data from FTP.
➜ owncloud sudo -u www-data php occ files:scan dlt

Scanning files for 1 users
Starting scan for user 1 out of 1 (dlt)
Exception during scan: ErrorException: Undefined offset: 0
#0 /var/www/owncloud/apps/files_external_ftp/lib/Storage/FTP.php(98): OCA\Files\Command\Scan->exceptionErrorHandler(8, ‘Undefined offse…’, ‘/var/www/ownclo…’, 98, Array)
#1 /var/www/owncloud/lib/private/Files/Storage/Common.php(639): OCA\Files_external_ftp\Storage\FTP->filemtime(‘Mod\xC3\xA8les Office…’)
#2 /var/www/owncloud/lib/private/Files/Storage/Wrapper/Wrapper.php(578): OC\Files\Storage\Common->getMetaData(‘Mod\xC3\xA8les Office…’)
#3 /var/www/owncloud/lib/private/Files/Storage/Wrapper/Wrapper.php(578): OC\Files\Storage\Wrapper\Wrapper->getMetaData(‘Mod\xC3\xA8les Office…’)
#4 /var/www/owncloud/lib/private/Files/Storage/Wrapper/Availability.php(459): OC\Files\Storage\Wrapper\Wrapper->getMetaData(‘Mod\xC3\xA8les Office…’)
#5 /var/www/owncloud/lib/private/Files/Storage/Wrapper/Encryption.php(175): OC\Files\Storage\Wrapper\Availability->getMetaData(‘Mod\xC3\xA8les Office…’)
#6 /var/www/owncloud/lib/private/Files/Storage/Wrapper/Checksum.php(202): OC\Files\Storage\Wrapper\Encryption->getMetaData(‘Mod\xC3\xA8les Office…’)
#7 /var/www/owncloud/lib/private/Files/Storage/Wrapper/Wrapper.php(578): OC\Files\Storage\Wrapper\Checksum->getMetaData(‘Mod\xC3\xA8les Office…’)
#8 /var/www/owncloud/lib/private/Files/Cache/Scanner.php(116): OC\Files\Storage\Wrapper\Wrapper->getMetaData(‘Mod\xC3\xA8les Office…’)
#9 /var/www/owncloud/lib/private/Files/Cache/Scanner.php(153): OC\Files\Cache\Scanner->getData(‘Mod\xC3\xA8les Office…’)
#10 /var/www/owncloud/lib/private/Files/Cache/Scanner.php(427): OC\Files\Cache\Scanner->scanFile(‘Mod\xC3\xA8les Office…’, 3, ‘3685’, Object(OC\Files\Cache\CacheEntry), true)
#11 /var/www/owncloud/lib/private/Files/Cache/Scanner.php(395): OC\Files\Cache\Scanner->handleChildren(’’, true, 3, ‘3685’, true, 2408)
#12 /var/www/owncloud/lib/private/Files/Cache/Scanner.php(328): OC\Files\Cache\Scanner->scanChildren(’’, true, 3, ‘3685’, true)
#13 /var/www/owncloud/lib/private/Files/Utils/Scanner.php(245): OC\Files\Cache\Scanner->scan(’’, true, 3)
#14 /var/www/owncloud/apps/files/lib/Command/Scan.php(245): OC\Files\Utils\Scanner->scan(’/dlt’, false)
#15 /var/www/owncloud/apps/files/lib/Command/Scan.php(392): OCA\Files\Command\Scan->scanFiles(‘dlt’, ‘/dlt’, false, Object(Symfony\Component\Console\Output\ConsoleOutput), false, false)
#16 /var/www/owncloud/apps/files/lib/Command/Scan.php(355): OCA\Files\Command\Scan->userScan(Array, NULL, false, Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), false)
#17 /var/www/owncloud/apps/files/lib/Command/Scan.php(321): OCA\Files\Command\Scan->processUserChunks(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), Array, NULL, false)
#18 /var/www/owncloud/lib/composer/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /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))
#20 /var/www/owncloud/lib/composer/symfony/console/Application.php(953): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/owncloud/lib/composer/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/owncloud/lib/composer/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /var/www/owncloud/lib/private/Console/Application.php(161): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /var/www/owncloud/console.php(106): OC\Console\Application->run()
#25 /var/www/owncloud/occ(11): require_once(’/var/www/ownclo…’)
#26 {main}

±--------±------±-------------±-----------------+
| Folders | Files | Elapsed time | Items per second |
±--------±------±-------------±-----------------+
| 15 | 613 | 00:00:06 | 100 |
±--------±------±-------------±-----------------+

Server configuration

Operating system:

Debian

Web server:

Apache

Database:

mysql

PHP version:

PHP 7.0.33-0+deb9u3

ownCloud version: (see ownCloud admin page)

10.1.0.4

Updated from an older ownCloud or fresh install:

fresh install

Where did you install ownCloud from:

02/2019

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

No errors have been found.

The content of config/config.php:

{
“system”: {
“instanceid”: “ocwtuadg09g1”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“owncloud.**.fr"
],
“datadirectory”: “/var/www/owncloud/data”,
“overwrite.cli.url”: "https://owncloud.
.fr/owncloud”,
“dbtype”: “mysql”,
“version”: “10.1.0.4”,
“dbname”: “owncloud”,
“dbhost”: “localhost”,
“dbtableprefix”: “oc_”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“logtimezone”: “UTC”,
“installed”: true,
“force ssl”: true,
“loglevel”: 2,
“maintenance”: false,
“singleuser”: false
}
}

ATTENTION: Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove all host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.


**List of activated apps:**

Enabled:
  - comments: 0.3.0
  - configreport: 0.1.1
  - dav: 0.4.0
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.1
  - files_external_ftp: 0.2.1
  - files_sharing: 0.11.0
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - market: 0.3.0
  - notifications: 0.4.1
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.4.0
  - updatenotification: 0.2.1
Disabled:
  - encryption
  - external
  - user_external


If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.


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

FTP

**Are you using encryption:** yes/no

NO

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

NO

#### LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM oc_appconfig WHERE appid = ‘user_ldap’;

Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.


### Client configuration
**Browser:**

**Operating system:**

### Logs

#### Web server error log

Insert your webserver log here


#### ownCloud log (data/owncloud.log)

I show a little part of the log beacose is too big

{“reqId”:“eedb03b6-f3fe-46a3-8e87-862a243b48ef”,“level”:3,“time”:“2019-03-21T13:41:04+00:00”,“remoteAddr”:“192.168.1.254”,“user”:“dlt”,“app”:“PHP”,“method”:“PROPFIND”,“url”:"/remote.php/dav/files/dlt/TSE_DLT/Mod%C3%A8les%20Office%20personnalis%C3%A9s",“message”:“Undefined offset: 7 at /var/www/owncloud/apps/files_external_ftp/lib/Storage/Adapter.php#44”}
{“reqId”:“eedb03b6-f3fe-46a3-8e87-862a243b48ef”,“level”:3,“time”:“2019-03-21T13:41:04+00:00”,“remoteAddr”:“192.168.1.254”,“user”:“dlt”,“app”:“PHP”,“method”:“PROPFIND”,“url”:"/remote.php/dav/files/dlt/TSE_DLT/Mod%C3%A8les%20Office%20personnalis%C3%A9s",“message”:“Undefined offset: 8 at /var/www/owncloud/apps/files_external_ftp/lib/Storage/Adapter.php#44”}
{“reqId”:“eedb03b6-f3fe-46a3-8e87-862a243b48ef”,“level”:3,“time”:“2019-03-21T13:41:04+00:00”,“remoteAddr”:“192.168.1.254”,“user”:“dlt”,“app”:“PHP”,“method”:“PROPFIND”,“url”:"/remote.php/dav/files/dlt/TSE_DLT/Mod%C3%A8les%20Office%20personnalis%C3%A9s",“message”:“Undefined offset: 0 at /var/www/owncloud/apps/files_external_ftp/lib/Storage/FTP.php#98”}
{“reqId”:“eedb03b6-f3fe-46a3-8e87-862a243b48ef”,“level”:3,“time”:“2019-03-21T13:41:04+00:00”,“remoteAddr”:“192.168.1.254”,“user”:“dlt”,“app”:“PHP”,“method”:“PROPFIND”,“url”:"/remote.php/dav/files/dlt/TSE_DLT/Mod%C3%A8les%20Office%20personnalis%C3%A9s",“message”:“Undefined offset: 4 at /var/www/owncloud/apps/files_external_ftp/lib/Storage/Adapter.php#44”}
{“reqId”:“eedb03b6-f3fe-46a3-8e87-862a243b48ef”,“level”:3,“time”:“2019-03-21T13:41:04+00:00”,“remoteAddr”:“192.168.1.254”,“user”:“dlt”,“app”:“PHP”,“method”:“PROPFIND”,“url”:"/remote.php/dav/files/dlt/TSE_DLT/Mod%C3%A8les%20Office%20personnalis%C3%A9s",“message”:“Undefined offset: 5 at /var/www/owncloud/apps/files_external_ftp/lib/Storage/Adapter.php#44”}
{“reqId”:“eedb03b6-f3fe-46a3-8e87-862a243b48ef”,“level”:3,“time”:“2019-03-21T13:41:04+00:00”,“remoteAddr”:“192.168.1.254”,“user”:“dlt”,“app”:“PHP”,“method”:“PROPFIND”,“url”:"/remote.php/dav/files/dlt/TSE_DLT/Mod%C3%A8les%20Office%20personnalis%C3%A9s",“message”:“Undefined offset: 6 at /var/www/owncloud/apps/files_external_ftp/lib/Storage/Adapter.php#44”}
{“reqId”:“eedb03b6-f3fe-46a3-8e87-862a243b48ef”,“level”:3,“time”:“2019-03-21T13:41:04+00:00”,“remoteAddr”:“192.168.1.254”,“user”:“dlt”,“app”:“PHP”,“method”:“PROPFIND”,“url”:"/remote.php/dav/files/dlt/TSE_DLT/Mod%C3%A8les%20Office%20personnalis%C3%A9s",“message”:“Undefined offset: 7 at /var/www/owncloud/apps/files_external_ftp/lib/Storage/Adapter.php#44”}
{“reqId”:“eedb03b6-f3fe-46a3-8e87-862a243b48ef”,“level”:3,“time”:“2019-03-21T13:41:04+00:00”,“remoteAddr”:“192.168.1.254”,“user”:“dlt”,“app”:“PHP”,“method”:“PROPFIND”,“url”:"/remote.php/dav/files/dlt/TSE_DLT/Mod%C3%A8les%20Office%20personnalis%C3%A9s",“message”:“Undefined offset: 8 at /var/www/owncloud/apps/files_external_ftp/lib/Storage/Adapter.php#44”}


#### Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) …