### Steps to reproduce
1. occ maintenance files:scan --username
### Expected beh…aviour
Normal file scan and update ending with output of folder, files and elapsed time
### Actual behaviour
Exception while scanning: Undefined index: parent
0 /var/www/owncloud/lib/private/Files/Cache/Cache/php(146): OCA\Files\Command\Scan->exceptionErrorHandler(8, 'Undefined index...', '/var/www/ownclo...', 146, Array)
### Server configuration
**Operating system**: Ubuntu 14.04
**Web server:** Apache
**Database:** MySQL
**PHP version:** 5
**ownCloud version:** 9.1.1
**Updated from an older ownCloud or fresh install:** Updated from 9.1.0 as part of troubleshooting. Issue started with 9.1.0 which was a fresh install
**Where did you install ownCloud from:** Owncloud packages, download.owncloud.org Ubuntu_14.04
**Signing status (ownCloud 9.0 and above):**
```
No errors have been found.
```
**List of activated apps:**
```
Enabled:
- activity: 2.3.2
- comments: 0.3.0
- dav: 0.2.6
- external: true
- federatedfilesharing: 0.3.0
- federation: 0.1.0
- files: 1.5.1
- files_external: 0.6.0
- files_pdfviewer: 0.8.1
- files_sharing: 0.10.0
- files_texteditor: 2.1
- files_trashbin: 0.9.0
- files_versions: 1.3.0
- files_videoplayer: 0.9.8
- firstrunwizard: 1.1
- gallery: 15.0.0
- notifications: 0.3.0
- provisioning_api: 0.5.0
- systemtags: 0.3.0
- templateeditor: 0.1
- updatenotification: 0.2.1
Disabled:
- encryption
- files_antivirus
- user_external
- user_ldap
```
**The content of config/config.php:**
```
{
"system": {
"updatechecker": false,
"instanceid": "ocv5e88ua6pp",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"bcloud.theborgergroup.com",
"bcloud",
"bcloud.theborgergroup.local",
"192.168.115.3"
],
"datadirectory": "\/var\/www\/owncloud\/data",
"overwrite.cli.url": "http:\/\/REMOVED SENSITIVE VALUE\/owncloud",
"dbtype": "mysql",
"version": "9.1.1.3",
"dbname": "owncloud",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"logtimezone": "EST",
"installed": true,
"mail_smtpmode": "smtp",
"mail_from_address": "info",
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "25",
"memcache.local": "\\OC\\Memcache\\APC",
"maintenance": false,
"singleuser": false,
"loglevel": 4
}
}
```
**Are you using external storage, if yes which one:** SMB
**Are you using encryption:** no
**Are you using an external user-backend, if yes which one:** Webdav
### Client configuration
**Browser:** Internet Explorer and Chrome
**Operating system:** Windows 10
### Logs
#### Web server error log
```
Insert your webserver log here
```
#### ownCloud log (data/owncloud.log)
```
Fatal webdav Exception: {"Message":"Invalid request for \/2012 (NotFoundException)","Exception":"Icewind\\SMB\\Exception\\NotFoundException","Code":0,"Trace":"#0 \/var\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Share.php(398): Icewind\\SMB\\Parser->checkForError(Array, '\/2012')\n#1 \/var\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Share.php(140): Icewind\\SMB\\Share->parseOutput(Array, '\/2012')\n#2 \/var\/www\/owncloud\/apps\/files_external\/lib\/Lib\/Storage\/SMB.php(139): Icewind\\SMB\\Share->stat('\/2012')\n#3 \/var\/www\/owncloud\/apps\/files_external\/lib\/Lib\/Storage\/SMB.php(279): OCA\\Files_External\\Lib\\Storage\\SMB->getFileInfo('2012')\n#4 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Common.php(172): OCA\\Files_External\\Lib\\Storage\\SMB->stat('2012')\n#5 \/var\/www\/owncloud\/apps\/files_external\/lib\/Lib\/Storage\/SMB.php(361): OC\\Files\\Storage\\Common->filemtime('2012')\n#6 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(373): OCA\\Files_External\\Lib\\Storage\\SMB->hasUpdated('2012', 1441563794)\n#7 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Availability.php(394): OC\\Files\\Storage\\Wrapper\\Wrapper->hasUpdated('2012', 1441563794)\n#8 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(373): OC\\Files\\Storage\\Wrapper\\Availability->hasUpdated('2012', 1441563794)\n#9 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(373): OC\\Files\\Storage\\Wrapper\\Wrapper->hasUpdated('2012', 1441563794)\n#10 \/var\/www\/owncloud\/lib\/private\/Files\/Cache\/Watcher.php(125): OC\\Files\\Storage\\Wrapper\\Wrapper->hasUpdated('2012', 1441563794)\n#11 \/var\/www\/owncloud\/lib\/private\/Files\/View.php(1299): OC\\Files\\Cache\\Watcher->needsUpdate('2012', Object(OC\\Files\\Cache\\CacheEntry))\n#12 \/var\/www\/owncloud\/lib\/private\/Files\/View.php(1337): OC\\Files\\View->getCacheEntry(Object(OCA\\Files_Trashbin\\Storage), '2012', 'TLPictures\/2012')\n#13 \/var\/www\/owncloud\/apps\/dav\/lib\/Connector\/Sabre\/ObjectTree.php(157): OC\\Files\\View->getFileInfo('TLPictures\/2012')\n#14 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(903): OCA\\DAV\\Connector\\Sabre\\ObjectTree->getNodeForPath('TLPictures\/2012')\n#15 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(334): Sabre\\DAV\\Server->getPropertiesForPath('TLPictures\/2012', Array, 1)\n#16 [internal function]: Sabre\\DAV\\CorePlugin->httpPropFind(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#17 \/var\/www\/owncloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#18 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:PROPFIND', Array)\n#19 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#20 \/var\/www\/owncloud\/apps\/dav\/appinfo\/v1\/webdav.php(56): Sabre\\DAV\\Server->exec()\n#21 \/var\/www\/owncloud\/remote.php(164): require_once('\/var\/www\/ownclo...')\n#22 {main}","File":"\/var\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Parser.php","Line":57,"User":"tjborger"} 2016-10-26T15:07:05-04:00
Error PHP Undefined index: permissions at /var/www/owncloud/lib/private/Files/Cache/Cache.php#158 2016-10-26T15:07:04-04:00
Error PHP Undefined index: mimepart at /var/www/owncloud/lib/private/Files/Cache/Cache.php#154 2016-10-26T15:07:04-04:00
Error PHP Undefined index: mimetype at /var/www/owncloud/lib/private/Files/Cache/Cache.php#153 2016-10-26T15:07:04-04:00
Error PHP Undefined index: encrypted at /var/www/owncloud/lib/private/Files/Cache/Cache.php#151 2016-10-26T15:07:04-04:00
Error PHP Undefined index: encrypted at /var/www/owncloud/lib/private/Files/Cache/Cache.php#150 2016-10-26T15:07:04-04:00
Error PHP Undefined index: storage_mtime at /var/www/owncloud/lib/private/Files/Cache/Cache.php#149 2016-10-26T15:07:04-04:00
Error PHP Undefined index: mtime at /var/www/owncloud/lib/private/Files/Cache/Cache.php#148 2016-10-26T15:07:04-04:00
Error PHP Undefined index: size at /var/www/owncloud/lib/private/Files/Cache/Cache.php#147 2016-10-26T15:07:04-04:00
Error PHP Undefined index: parent at /var/www/owncloud/lib/private/Files/Cache/Cache.php#146 2016-10-26T15:07:04-04:00
Error PHP Undefined index: permissions at /var/www/owncloud/lib/private/Files/Cache/Cache.php#158 2016-10-26T15:07:04-04:00
Error PHP Undefined index: mimepart at /var/www/owncloud/lib/private/Files/Cache/Cache.php#154 2016-10-26T15:07:04-04:00
Error PHP Undefined index: mimetype at /var/www/owncloud/lib/private/Files/Cache/Cache.php#153 2016-10-26T15:07:04-04:00
Error PHP Undefined index: encrypted at /var/www/owncloud/lib/private/Files/Cache/Cache.php#151 2016-10-26T15:07:04-04:00
Error PHP Undefined index: encrypted at /var/www/owncloud/lib/private/Files/Cache/Cache.php#150 2016-10-26T15:07:04-04:00
Error PHP Undefined index: storage_mtime at /var/www/owncloud/lib/private/Files/Cache/Cache.php#149 2016-10-26T15:07:04-04:00
Error PHP Undefined index: mtime at /var/www/owncloud/lib/private/Files/Cache/Cache.php#148 2016-10-26T15:07:04-04:00
Error PHP Undefined index: size at /var/www/owncloud/lib/private/Files/Cache/Cache.php#147 2016-10-26T15:07:04-04:00
Error PHP Undefined index: parent at /var/www/owncloud/lib/private/Files/Cache/Cache.php#146 2016-10-26T15:07:04-04:00
Error PHP Undefined index: permissions at /var/www/owncloud/lib/private/Files/Cache/Cache.php#158 2016-10-26T15:06:59-04:00
Error PHP Undefined index: mimepart at /var/www/owncloud/lib/private/Files/Cache/Cache.php#154 2016-10-26T15:06:59-04:00
Error PHP Undefined index: mimetype at /var/www/owncloud/lib/private/Files/Cache/Cache.php#153 2016-10-26T15:06:59-04:00
Error PHP Undefined index: encrypted at /var/www/owncloud/lib/private/Files/Cache/Cache.php#151 2016-10-26T15:06:59-04:00
Error PHP Undefined index: encrypted at /var/www/owncloud/lib/private/Files/Cache/Cache.php#150 2016-10-26T15:06:59-04:00
Error PHP Undefined index: storage_mtime at /var/www/owncloud/lib/private/Files/Cache/Cache.php#149 2016-10-26T15:06:59-04:00
Error PHP Undefined index: mtime at /var/www/owncloud/lib/private/Files/Cache/Cache.php#148 2016-10-26T15:06:59-04:00
Error PHP Undefined index: size at /var/www/owncloud/lib/private/Files/Cache/Cache.php#147 2016-10-26T15:06:59-04:00
Error PHP Undefined index: parent at /var/www/owncloud/lib/private/Files/Cache/Cache.php#146 2016-10-26T15:06:59-04:00
Error PHP Undefined index: permissions at /var/www/owncloud/lib/private/Files/Cache/Cache.php#158 2016-10-26T15:06:59-04:00
Error PHP Undefined index: mimepart at /var/www/owncloud/lib/private/Files/Cache/Cache.php#154 2016-10-26T15:06:59-04:00
Error PHP Undefined index: mimetype at /var/www/owncloud/lib/private/Files/Cache/Cache.php#153 2016-10-26T15:06:59-04:00
Error PHP Undefined index: encrypted at /var/www/owncloud/lib/private/Files/Cache/Cache.php#151 2016-10-26T15:06:59-04:00
Error PHP Undefined index: encrypted at /var/www/owncloud/lib/private/Files/Cache/Cache.php#150 2016-10-26T15:06:59-04:00
Error PHP Undefined index: storage_mtime at /var/www/owncloud/lib/private/Files/Cache/Cache.php#149 2016-10-26T15:06:59-04:00
Error PHP Undefined index: mtime at /var/www/owncloud/lib/private/Files/Cache/Cache.php#148 2016-10-26T15:06:59-04:00
Error PHP Undefined index: size at /var/www/owncloud/lib/private/Files/Cache/Cache.php#147 2016-10-26T15:06:59-04:00
Error PHP Undefined index: parent at /var/www/owncloud/lib/private/Files/Cache/Cache.php#146 2016-10-26T15:06:59-04:00
Fatal webdav Exception: {"Message":"HTTP\/1.1 409 Parent node does not exist","Exception":"Sabre\\DAV\\Exception\\Conflict","Code":0,"Trace":"#0 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(588): Sabre\\DAV\\Server->createCollection('TomPictures\/Tom...', Object(Sabre\\DAV\\MkCol))\n#1 [internal function]: Sabre\\DAV\\CorePlugin->httpMkcol(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#2 \/var\/www\/owncloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:MKCOL', Array)\n#4 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \/var\/www\/owncloud\/apps\/dav\/appinfo\/v1\/webdav.php(56): Sabre\\DAV\\Server->exec()\n#6 \/var\/www\/owncloud\/remote.php(164): require_once('\/var\/www\/ownclo...')\n#7 {main}","File":"\/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","Line":1107,"User":"tjborger"} 2016-10-26T15:06:24-04:00
Fatal webdav Exception: {"Message":"Invalid request for \/2012 (NotFoundException)","Exception":"Icewind\\SMB\\Exception\\NotFoundException","Code":0,"Trace":"#0 \/var\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Share.php(398): Icewind\\SMB\\Parser->checkForError(Array, '\/2012')\n#1 \/var\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Share.php(140): Icewind\\SMB\\Share->parseOutput(Array, '\/2012')\n#2 \/var\/www\/owncloud\/apps\/files_external\/lib\/Lib\/Storage\/SMB.php(139): Icewind\\SMB\\Share->stat('\/2012')\n#3 \/var\/www\/owncloud\/apps\/files_external\/lib\/Lib\/Storage\/SMB.php(279): OCA\\Files_External\\Lib\\Storage\\SMB->getFileInfo('2012')\n#4 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Common.php(172): OCA\\Files_External\\Lib\\Storage\\SMB->stat('2012')\n#5 \/var\/www\/owncloud\/apps\/files_external\/lib\/Lib\/Storage\/SMB.php(361): OC\\Files\\Storage\\Common->filemtime('2012')\n#6 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(373): OCA\\Files_External\\Lib\\Storage\\SMB->hasUpdated('2012', 1441563794)\n#7 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Availability.php(394): OC\\Files\\Storage\\Wrapper\\Wrapper->hasUpdated('2012', 1441563794)\n#8 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(373): OC\\Files\\Storage\\Wrapper\\Availability->hasUpdated('2012', 1441563794)\n#9 \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(373): OC\\Files\\Storage\\Wrapper\\Wrapper->hasUpdated('2012', 1441563794)\n#10 \/var\/www\/owncloud\/lib\/private\/Files\/Cache\/Watcher.php(125): OC\\Files\\Storage\\Wrapper\\Wrapper->hasUpdated('2012', 1441563794)\n#11 \/var\/www\/owncloud\/lib\/private\/Files\/View.php(1299): OC\\Files\\Cache\\Watcher->needsUpdate('2012', Object(OC\\Files\\Cache\\CacheEntry))\n#12 \/var\/www\/owncloud\/lib\/private\/Files\/View.php(1337): OC\\Files\\View->getCacheEntry(Object(OCA\\Files_Trashbin\\Storage), '2012', 'TLPictures\/2012')\n#13 \/var\/www\/owncloud\/apps\/dav\/lib\/Connector\/Sabre\/ObjectTree.php(157): OC\\Files\\View->getFileInfo('TLPictures\/2012')\n#14 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(903): OCA\\DAV\\Connector\\Sabre\\ObjectTree->getNodeForPath('TLPictures\/2012')\n#15 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(334): Sabre\\DAV\\Server->getPropertiesForPath('TLPictures\/2012', Array, 1)\n#16 [internal function]: Sabre\\DAV\\CorePlugin->httpPropFind(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#17 \/var\/www\/owncloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#18 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:PROPFIND', Array)\n#19 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#20 \/var\/www\/owncloud\/apps\/dav\/appinfo\/v1\/webdav.php(56): Sabre\\DAV\\Server->exec()\n#21 \/var\/www\/owncloud\/remote.php(164): require_once('\/var\/www\/ownclo...')\n#22 {main}","File":"\/var\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Parser.php","Line":57,"User":"lizborger"} 2016-10-26T14:53:56-04:00
Error PHP Undefined index: permissions at /var/www/owncloud/lib/private/Files/Cache/Cache.php#158 2016-10-26T14:53:19-04:00
Error PHP Undefined index: mimepart at /var/www/owncloud/lib/private/Files/Cache/Cache.php#154 2016-10-26T14:53:19-04:00
Error PHP Undefined index: mimetype at /var/www/owncloud/lib/private/Files/Cache/Cache.php#153 2016-10-26T14:53:19-04:00
Error PHP Undefined index: encrypted at /var/www/owncloud/lib/private/Files/Cache/Cache.php#151 2016-10-26T14:53:19-04:00
Error PHP Undefined index: encrypted at /var/www/owncloud/lib/private/Files/Cache/Cache.php#150 2016-10-26T14:53:19-04:00
Error PHP Undefined index: storage_mtime at /var/www/owncloud/lib/private/Files/Cache/Cache.php#149 2016-10-26T14:53:19-04:00
Error PHP Undefined index: mtime at /var/www/owncloud/lib/private/Files/Cache/Cache.php#148 2016-10-26T14:53:19-04:00
Error PHP Undefined index: size at /var/www/owncloud/lib/private/Files/Cache/Cache.php#147 2016-10-26T14:53:19-04:00
Error PHP Undefined index: parent at /var/www/owncloud/lib/private/Files/Cache/Cache.php#146 2016-10-26T14:53:19-04:00
Error PHP Undefined index: permissions at /var/www/owncloud/lib/private/Files/Cache/Cache.php#158 2016-10-26T14:53:19-04:00
Error PHP Undefined index: mimepart at /var/www/owncloud/lib/private/Files/Cache/Cache.php#154 2016-10-26T14:53:19-04:00
Error PHP Undefined index: mimetype at /var/www/owncloud/lib/private/Files/Cache/Cache.php#153 2016-10-26T14:53:19-04:00
Error PHP Undefined index: encrypted at /var/www/owncloud/lib/private/Files/Cache/Cache.php#151 2016-10-26T14:53:19-04:00
Error PHP Undefined index: encrypted at /var/www/owncloud/lib/private/Files/Cache/Cache.php#150 2016-10-26T14:53:19-04:00
```
#### Browser log
```
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
```