Hidden files issue with external storage (CIFS)
Steps to reproduce
- Set up external storage using SMB/CIFS
- Set up folder sync for such a folder
- Create a hidden file, i.e. a filename starting with a dot, e.g. ".test"
Expected behaviour
It just works.
Actual behaviour
It fails.
Server configuration
Operating system: Ubuntu 18.04.2 LTS
Web server: nginx version: nginx/1.14.0 (Ubuntu)
Database: psql (PostgreSQL) 11.2 (Ubuntu 11.2-1.pgdg18.04+1)
PHP version: PHP 7.2.15-0ubuntu0.18.04.2
Nextcloud version: 15.0.6
Updated from an older Nextcloud/ownCloud or fresh install: Updated
Where did you install Nextcloud from: ?
Signing status:
Signing status
No errors have been found.
List of activated apps:
App list
Enabled:
- accessibility: 1.1.0
- activity: 2.8.2
- admin_audit: 1.5.0
- bruteforcesettings: 1.3.0
- calendar: 1.6.4
- cloud_federation_api: 0.1.0
- comments: 1.5.0
- contacts: 3.0.5
- dav: 1.8.1
- federatedfilesharing: 1.5.0
- files: 1.10.0
- files_external: 1.6.0
- files_pdfviewer: 1.4.0
- files_sharing: 1.7.0
- files_texteditor: 2.7.0
- files_trashbin: 1.5.0
- files_versions: 1.8.0
- files_videoplayer: 1.4.0
- gallery: 18.2.0
- logreader: 2.0.0
- lookup_server_connector: 1.3.0
- mail: 0.11.0
- nextcloud_announcements: 1.4.0
- notes: 2.5.1
- notifications: 2.3.0
- oauth2: 1.3.0
- password_policy: 1.5.0
- provisioning_api: 1.5.0
- serverinfo: 1.5.0
- sharebymail: 1.5.0
- systemtags: 1.5.0
- theming: 1.6.0
- twofactor_backupcodes: 1.4.1
- updatenotification: 1.5.0
- workflowengine: 1.5.0
Disabled:
- drawio
- encryption
- federation
- firstrunwizard
- onlyoffice
- support
- survey_client
- tasks
- user_ldap
Nextcloud configuration:
Config report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***",
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "15.0.6.1",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"logtimezone": "UTC",
"log_type": "file",
"logfile": "\/var\/log\/nextcloud\/nextcloud.log",
"log_rotate_size": 104857600,
"installed": true,
"filelocking.enabled": true,
"memcache.locking": "\\OC\\Memcache\\Redis",
"memcache.local": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0,
"timeout": 0
},
"mail_smtpmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"mail_smtpsecure": "ssl",
"maintenance": false,
"updater.release.channel": "stable",
"theme": "",
"loglevel": 2,
"knowledgebaseenabled": false,
"onlyoffice": {
"verify_peer_off": true
}
}
}
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: no
Client configuration
Browser: N/A
Operating system: Tested with both Windows 10 and macOS Mojave
Logs
Web server error log
Web server error log
access.log:x.x.x.x - robert [08/Apr/2019:17:29:22 +0200] "PUT /remote.php/dav/files/robert/Robert/test123/.windows HTTP/2.0" 500 4521 "-" "Mozilla/5.0 (Windows) mirall/2.5.1final (build 20181204) (Nextcloud)"
access.log:x.x.x.x - robert [08/Apr/2019:17:30:27 +0200] "PUT /remote.php/dav/files/robert/Robert/test123/.windows HTTP/2.0" 404 212 "-" "Mozilla/5.0 (Windows) mirall/2.5.1final (build 20181204) (Nextcloud)"
Nextcloud log (data/nextcloud.log)
Nextcloud log
nextcloud.log:{"reqId":"hkl5jPLytm81hNmfsGyE","level":3,"time":"2019-04-08T15:29:22+00:00","remoteAddr":"x.x.x.x","user":"robert","app":"PHP","method":"PUT","url":"\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","message":"Undefined index: size at \/var\/www\/nextcloud\/lib\/private\/Files\/View.php#1326","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.6.1"}
nextcloud.log:{"reqId":"hkl5jPLytm81hNmfsGyE","level":3,"time":"2019-04-08T15:29:22+00:00","remoteAddr":"x.x.x.x","user":"robert","app":"PHP","method":"PUT","url":"\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","message":"Undefined index: storage_mtime at \/var\/www\/nextcloud\/lib\/private\/Files\/Cache\/Watcher.php#126","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.6.1"}
nextcloud.log:{"reqId":"hkl5jPLytm81hNmfsGyE","level":3,"time":"2019-04-08T15:29:22+00:00","remoteAddr":"x.x.x.x","user":"robert","app":"PHP","method":"PUT","url":"\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","message":"Undefined index: fileid at \/var\/www\/nextcloud\/lib\/private\/Files\/Cache\/Cache.php#456","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.6.1"}
nextcloud.log:{"reqId":"hkl5jPLytm81hNmfsGyE","level":3,"time":"2019-04-08T15:29:22+00:00","remoteAddr":"x.x.x.x","user":"robert","app":"PHP","method":"PUT","url":"\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","message":"Undefined index: mimetype at \/var\/www\/nextcloud\/lib\/private\/Files\/Cache\/Cache.php#457","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.6.1"}
nextcloud.log:{"reqId":"hkl5jPLytm81hNmfsGyE","level":3,"time":"2019-04-08T15:29:22+00:00","remoteAddr":"x.x.x.x","user":"robert","app":"PHP","method":"PUT","url":"\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","message":"Undefined index: mimetype at \/var\/www\/nextcloud\/lib\/private\/Files\/Cache\/Watcher.php#108","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.6.1"}
nextcloud.log:{"reqId":"hkl5jPLytm81hNmfsGyE","level":3,"time":"2019-04-08T15:29:22+00:00","remoteAddr":"x.x.x.x","user":"robert","app":"no app in context","method":"PUT","url":"\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","message":{"Exception":"OCP\\Files\\NotFoundException","Message":"\/Robert\/test123\/.windows not found while trying to get owner","Code":0,"Trace":[{"file":"\/var\/www\/nextcloud\/apps\/activity\/lib\/FilesHooks.php","line":638,"function":"getOwner","class":"OC\\Files\\View","type":"->","args":["\/Robert\/test123\/.windows"]},{"file":"\/var\/www\/nextcloud\/apps\/activity\/lib\/FilesHooks.php","line":190,"function":"getSourcePathAndOwner","class":"OCA\\Activity\\FilesHooks","type":"->","args":["\/Robert\/test123\/.windows"]},{"file":"\/var\/www\/nextcloud\/apps\/activity\/lib\/FilesHooks.php","line":146,"function":"addNotificationsForFileAction","class":"OCA\\Activity\\FilesHooks","type":"->","args":["\/Robert\/test123\/.windows","file_created","created_self","created_by"]},{"file":"\/var\/www\/nextcloud\/apps\/activity\/lib\/FilesHooksStatic.php","line":47,"function":"fileCreate","class":"OCA\\Activity\\FilesHooks","type":"->","args":["\/Robert\/test123\/.windows"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/legacy\/hook.php","line":106,"function":"fileCreate","class":"OCA\\Activity\\FilesHooksStatic","type":"::","args":[{"path":"\/Robert\/test123\/.windows"}]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php","line":351,"function":"emit","class":"OC_Hook","type":"::","args":["OC_Filesystem","post_create",{"path":"\/Robert\/test123\/.windows"}]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php","line":283,"function":"emitPostHooks","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[false]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1096,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":[".windows",null]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["files\/robert\/Robert\/test123\/.windows",null,null]},{"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https:\/\/somewhere.xyz\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPut"],[{"absoluteUrl":"https:\/\/somewhere.xyz\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PUT",[{"absoluteUrl":"https:\/\/somewhere.xyz\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/somewhere.xyz\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Server.php","line":301,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/remote.php","line":163,"args":["\/var\/www\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/var\/www\/nextcloud\/lib\/private\/Files\/View.php","Line":1677,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Windows) mirall\/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.6.1"}
nextcloud.log:{"reqId":"hkl5jPLytm81hNmfsGyE","level":3,"time":"2019-04-08T15:29:22+00:00","remoteAddr":"x.x.x.x","user":"robert","app":"PHP","method":"PUT","url":"\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","message":"Undefined index: size at \/var\/www\/nextcloud\/lib\/private\/Files\/View.php#1326","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.6.1"}
nextcloud.log:{"reqId":"hkl5jPLytm81hNmfsGyE","level":3,"time":"2019-04-08T15:29:22+00:00","remoteAddr":"x.x.x.x","user":"robert","app":"PHP","method":"PUT","url":"\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","message":"Undefined index: size at \/var\/www\/nextcloud\/lib\/private\/Files\/View.php#1326","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.6.1"}
nextcloud.log:{"reqId":"hkl5jPLytm81hNmfsGyE","level":3,"time":"2019-04-08T15:29:22+00:00","remoteAddr":"x.x.x.x","user":"robert","app":"PHP","method":"PUT","url":"\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","message":"Undefined index: size at \/var\/www\/nextcloud\/lib\/private\/Files\/View.php#1326","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.6.1"}
nextcloud.log:{"reqId":"hkl5jPLytm81hNmfsGyE","level":3,"time":"2019-04-08T15:29:22+00:00","remoteAddr":"x.x.x.x","user":"robert","app":"remote","method":"PUT","url":"\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","message":{"Exception":"Error","Message":"Call to a member function getChecksum() on boolean","Code":0,"Trace":[{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php","line":292,"function":"getChecksum","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1096,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":[".windows",null]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["files\/robert\/Robert\/test123\/.windows",null,null]},{"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https:\/\/somewhere.xyz\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPut"],[{"absoluteUrl":"https:\/\/somewhere.xyz\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PUT",[{"absoluteUrl":"https:\/\/somewhere.xyz\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/somewhere.xyz\/remote.php\/dav\/files\/robert\/Robert\/test123\/.windows","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Server.php","line":301,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/remote.php","line":163,"args":["\/var\/www\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php","Line":631,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Windows) mirall\/2.5.1final (build 20181204) (Nextcloud)","version":"15.0.6.1"}
Interestingly, the file got created on the server:
-rwxr--r-- 1 robert robert 0 Apr 8 17:29 .windows
root@nas:/mnt/volume1/robert/test123#
I just stumbled across https://github.com/nextcloud/server/issues/9663 and I believe it's the same issue. Sadly, this has been reported long time ago and still no fix?
https://github.com/nextcloud/server/issues/9663#issuecomment-505958689