server icon indicating copy to clipboard operation
server copied to clipboard

Copying file with a dot on the beginning to an external samba share fails

Open Af0x opened this issue 8 years ago • 18 comments

Hello, when trying to copy a file with a dot on the beginning (.examplefile) to an external storage it fails with an internal server error.

Regards,

Af0x

Af0x avatar May 29 '18 16:05 Af0x

@Af0x Could you provide the content of the nextcloud.log because there is the exact error message for this failure listed.

MorrisJobke avatar Jun 28 '18 06:06 MorrisJobke

sure:

{"reqId":"############","level":3,"time":"2018-06-28T10:18:32+00:00","remoteAddr":"#######","user":"user","app":"no app in context","method":"PUT","url":"/remote.php/webdav/external-folder/.test","message":"Exception: {"Exception":"OCP\\Files\\NotFoundException","Message":"\/external-folder\/.test not found while trying to get owner","Code":0,"Trace":"#0 \/path\/to\/nextcloud\/apps\/activity\/lib\/FilesHooks.php(638): OC\\Files\\View->getOwner('\/external-folder\/.test')\n#1 \/path\/to\/nextcloud\/apps\/activity\/lib\/FilesHooks.php(190): OCA\\Activity\\FilesHooks->getSourcePathAndOwner('\/external-folder\/.test')\n#2 \/path\/to\/nextcloud\/apps\/activity\/lib\/FilesHooks.php(146): OCA\\Activity\\FilesHooks->addNotificationsForFileAction('\/external-folder\/.test', 'file_created', 'created_self', 'created_by')\n#3 \/path\/to\/nextcloud\/apps\/activity\/lib\/FilesHooksStatic.php(47): OCA\\Activity\\FilesHooks->fileCreate('\/external-folder\/.test')\n#4 \/path\/to\/nextcloud\/lib\/private\/legacy\/hook.php(106): OCA\\Activity\\FilesHooksStatic::fileCreate(Array)\n#5 \/path\/to\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php(309): OC_Hook::emit('OC_Filesystem', 'post_create', Array)\n#6 \/path\/to\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php(241): OCA\\DAV\\Connector\\Sabre\\File->emitPostHooks(false)\n#7 \/path\/to\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php(156): OCA\\DAV\\Connector\\Sabre\\File->put(Resource id 11)\n#8 \/path\/to\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(1096): OCA\\DAV\\Connector\\Sabre\\Directory->createFile('.test', Resource id 11)\n#9 \/path\/to\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(529): Sabre\\DAV\\Server->createFile('external-folder\/.test', Resource id 11, NULL)\n#10 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#11 \/path\/to\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#12 \/path\/to\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit('method:PUT', Array)\n#13 \/path\/to\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#14 \/path\/to\/nextcloud\/apps\/dav\/appinfo\/v1\/webdav.php(80): Sabre\\DAV\\Server->exec()\n#15 \/path\/to\/nextcloud\/remote.php(164): require_once('\/path\/to\/nextcloud\/...')\n#16 {main}","File":"\/path\/to\/nextcloud\/lib\/private\/Files\/View.php","Line":1670}","userAgent":"gvfs/1.36.2","version":"13.0.4.0"} {"reqId":"############","level":3,"time":"2018-06-28T10:18:32+00:00","remoteAddr":"#######","user":"user","app":"remote","method":"PUT","url":"/remote.php/webdav/external-folder/.test","message":"Exception: {"Exception":"Error","Message":"Call to a member function getChecksum() on boolean","Code":0,"Trace":"#0 \/path\/to\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php(250): OCA\\DAV\\Connector\\Sabre\\File->getChecksum()\n#1 \/path\/to\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php(156): OCA\\DAV\\Connector\\Sabre\\File->put(Resource id 11)\n#2 \/path\/to\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(1096): OCA\\DAV\\Connector\\Sabre\\Directory->createFile('.test', Resource id 11)\n#3 \/path\/to\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(529): Sabre\\DAV\\Server->createFile('external-folder\/.test', Resource id 11, NULL)\n#4 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \/path\/to\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#6 \/path\/to\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit('method:PUT', Array)\n#7 \/path\/to\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#8 \/path\/to\/nextcloud\/apps\/dav\/appinfo\/v1\/webdav.php(80): Sabre\\DAV\\Server->exec()\n#9 \/path\/to\/nextcloud\/remote.php(164): require_once('\/path\/to\/nextcloud\/...')\n#10 {main}","File":"\/path\/to\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php","Line":596}","userAgent":"gvfs/1.36.2","version":"13.0.4.0"}

Af0x avatar Jun 28 '18 10:06 Af0x

Hey, this issue has been closed because the label needs info is set and there were no updates for 21 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

nextcloud-bot avatar Jul 20 '18 13:07 nextcloud-bot

cc @icewind1991

MorrisJobke avatar Jul 24 '18 11:07 MorrisJobke

Now I updated to 13.0.6 Files starting with an dot can now be created in the web-interface but they are not shown. Yes, show hidden files is enabled. The files are also synchronised to the desktop-client and the android app. In the app they are also not shown. When I create a hidden file on the desktop or in the app the file is uploaded to the server but I get an error "Server not found" Once created a hidden file is not synchronised after changing it.

In the server log I get: {"reqId":"uPLSSDljnwpVGsk2iiO2", "level":3, "time":"2018-09-07T12:13:39+00:00", "remoteAddr":"10.10.97.80", "user":"ta", "app":"PHP", "method":"PUT", "url":"/remote.php/dav/files/ta/SMB/testfiles/.test2", "message":"Undefined index: size at /nxcloud.lan/lib/private/Files/View.php#1320", "userAgent":"Mozilla/5.0 (Linux) mirall/2.3.3 (Nextcloud)","version":"13.0.6.1"}

{"reqId":"uPLSSDljnwpVGsk2iiO2", "level":3, "time":"2018-09-07T12:13:39+00:00", "remoteAddr":"10.10.97.80", "user":"ta", "app":"PHP", "method":"PUT", "url":"/remote.php/dav/files/ta/SMB/testfiles/.test2", "message":"Undefined index: fileid at /nxcloud.lan/lib/private/Files/Cache/Cache.php#443","userAgent":"Mozilla/5.0 (Linux) mirall/2.3.3 (Nextcloud)","version":"13.0.6.1"}

{"reqId":"uPLSSDljnwpVGsk2iiO2", "level":3, "time":"2018-09-07T12:13:39+00:00", "remoteAddr":"10.10.97.80", "user":"ta", "app":"PHP", "method":"PUT", "url":"/remote.php/dav/files/ta/SMB/testfiles/.test2", "message":"Undefined index: mimetype at /nxcloud.lan/lib/private/Files/Cache/Cache.php#444","userAgent":"Mozilla/5.0 (Linux) mirall/2.3.3 (Nextcloud)","version":"13.0.6.1"}

{"reqId":"uPLSSDljnwpVGsk2iiO2", "level":3, "time":"2018-09-07T12:13:39+00:00", "remoteAddr":"10.10.97.80", "user":"ta", "app":"PHP", "method":"PUT", "url":"/remote.php/dav/files/ta/SMB/testfiles/.test2", "message":"Undefined index: mimetype at /nxcloud.lan/lib/private/Files/Cache/Watcher.php#108","userAgent":"Mozilla/5.0 (Linux) mirall/2.3.3 (Nextcloud)","version":"13.0.6.1"}

{"reqId":"uPLSSDljnwpVGsk2iiO2", "level":3, "time":"2018-09-07T12:13:39+00:00", "remoteAddr":"10.10.97.80", "user":"ta", "app":"no app in context", "method":"PUT", "url":"/remote.php/dav/files/ta/SMB/testfiles/.test2", "message":"Exception: {"Exception":"OCP\\Files\\NotFoundException","Message":"\/SMB\/testfiles\/.test2 not found while trying to get owner","Code":0,"Trace":"#0 \/nxcloud.lan\/apps\/activity\/lib\/FilesHooks.php(638): OC\\Files\\View->getOwner('\/SMB\/testfiles...')\n#1 \/nxcloud.lan\/apps\/activity\/lib\/FilesHooks.php(190): OCA\\Activity\\FilesHooks->getSourcePathAndOwner('\/SMB\/testfiles...')\n#2 \/nxcloud.lan\/apps\/activity\/lib\/FilesHooks.php(146): OCA\\Activity\\FilesHooks->addNotificationsForFileAction('\/SMB\/testfiles...', 'file_created', 'created_self', 'created_by')\n#3 \/nxcloud.lan\/apps\/activity\/lib\/FilesHooksStatic.php(47): OCA\\Activity\\FilesHooks->fileCreate('\/SMB\/testfiles...')\n#4 \//nxcloud.lan\/lib\/private\/legacy\/hook.php(106): OCA\\Activity\\FilesHooksStatic::fileCreate(Array)\n#5 \/nxcloud.lan\/apps\/dav\/lib\/Connector\/Sabre\/File.php(317): OC_Hook::emit('OC_Filesystem', 'post_create', Array)\n#6 \/nxcloud.lan\/apps\/dav\/lib\/Connector\/Sabre\/File.php(249): OCA\\DAV\\Connector\\Sabre\\File->emitPostHooks(false)\n#7 \/nxcloud.lan\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php(156): OC A\\DAV\\Connector\\Sabre\\File->put(Resource id #22)\n#8 \/nxcloud.lan\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(1096): OCA\\DAV\\Connector\\Sabre\\Directory->createFile('.test2', Resource id #22)\n#9 \/nxcloud.lan\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(529): Sabre\\DAV\\Server->createFile('files\/ta\/SMB\/te...', Resource id #22, NULL)\n#10 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#11 \/nxcloud.lan\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#12 \/nxcloud.lan\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit('method:PUT', Array)\n#13 \/nxcloud.lan\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#14 \/nxcloud.lan\/apps\/dav\/lib\/Server.php(293): Sabre\\DAV\\Server->exec()\n#15 \/nxcloud.lan\/apps\/dav\/appinfo\/v2\/remote.php(35): OCA\\DAV\\Server->exec()\n#16 \/nxcloud.lan\/remote.php(164): require_once('\/srv\/hostingdat...')\n#17 {main}","File":"\/nxcloud.lan\/lib\/private\/Files\/View.php","Line":1670}","userAgent":"Mozilla/5.0 (Linux) mirall/2.3.3 (Nextcloud)","version":"13.0.6.1"}

lsbbs avatar Sep 07 '18 12:09 lsbbs

Is there any progress on this bug? Now on 14.03 and the behave is still the same: Filest starting with a . in a SMB external storage causing an 500 error when trying to sync.

lsbbs avatar Nov 04 '18 14:11 lsbbs

Even browsing files/folders on an SMB share with the 'show hidden files' option selected doesn't actually show any hidden files/folders. I need to see them, and the feature isn't working.

ymgenesis avatar Nov 15 '18 20:11 ymgenesis

Even browsing files/folders on an SMB share with the 'show hidden files' option selected doesn't actually show any hidden files/folders. I need to see them, and the feature isn't working.

It is not working here too. Nextcloud 15.0.2

rodrigoscoelho avatar Jan 23 '19 12:01 rodrigoscoelho

Am 23.01.19 um 15:39 schrieb rodrigoscoelho:

Even browsing files/folders on an SMB share with the 'show hidden
files' option selected doesn't actually show any hidden
files/folders. I need to see them, and the feature isn't working.

It is not working here too. Nextcloud 15.0.2

I reported this bug a long time ago. Not only that the files are not shown. On the server side syncing a hidden file or folder it is causing an 500 fatal error.

lsbbs avatar Jan 23 '19 17:01 lsbbs

Hello @icewind1991

any idea on this?

Audio Player is using ".noaudio" files to exclude folders from scanning. But as ".*" files are not shown in NC (but they are actually available on the SMB file level), they are not part of filecache => they are not available for apps

Rello avatar Feb 12 '19 21:02 Rello

I think the same issues is effecting syncing of github/laurent22/joplin. The sync works fine if I use a NextCloud folder that isn't on my external storage / SMB drive. Here's the specific error message from Joplin. Let me know you need any other error logs.

Last error: Error: MKCOL .sync/: Could not create directory /Central/Documents/ Personal/Information/Notetaking/.sync (Exception Sabre\DAV\Exception\Forbidden) (403): <d:error xmlns:d="DAV:" xmlns:s= "http://sabredav.org/ns"> <s:exception>Sabre\DAV\Exception\Forbidden</ s:exception> <s:message>Could not create directory /Central/Documents/Personal/Information/Notetaking/.sync</s:message> </d:error>

cweinhofer avatar Feb 27 '19 13:02 cweinhofer

Also seeing this, but I can't even create dotfiles from the interface like some people here, and my files are stored on the same machine running nextcloud, not an external drive. I received 403 Forbidden when doing so on Nextcloud 15.0.5

benjivm avatar Mar 28 '19 16:03 benjivm

As this doesn't seem to work with internal storage either (as @benjivm mentioned) the "feature: external storage" label should be removed again?!

rawbertl avatar Apr 13 '19 06:04 rawbertl

a little bump on this. anyone can look at this?

Rello avatar Jun 15 '19 21:06 Rello

i have exact the same problem. No dotfiles and/or hidden directories can be created or synced.

subhead avatar Jun 25 '19 12:06 subhead

I ran into this problem as well. After some investigations, the issue seems to be in the config on the samba server side. In smb.conf, the hide dot files needs to be set to false. i.e. hide dot files = No

There's actually a note about this in the official documentation.

andrewkww avatar Jun 26 '19 16:06 andrewkww

As mentioned in the documentation setting

hide dot files = No

for your share fixes this issue. Thanks @andrewkww

Af0x avatar Jun 26 '19 17:06 Af0x

Same problem here, ".digikam.mysql" folder was not synced with the same error to the Samba external storage.

I had the hide dot files = No already setup and I would bet it used to work (maybe the files got not synced, however I have not seen a sync error until today).

The problem got resolved by activating the option show hidden files in Nexctloud WebUI in Settings for External Storage:

image

I do not recall if the option has always been there or not.

archont00 avatar Jun 19 '20 06:06 archont00