Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Af0x opened this issue May 29, 2018 · 18 comments
Closed

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

Af0x opened this issue May 29, 2018 · 18 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: external storage

Comments

@Af0x
Copy link

Af0x commented May 29, 2018

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

@MorrisJobke
Copy link
Member

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

@Af0x
Copy link
Author

Af0x commented Jun 28, 2018

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"}

@nextcloud-bot
Copy link
Member

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.)

@MorrisJobke
Copy link
Member

cc @icewind1991

@lsbbs
Copy link

lsbbs commented Sep 7, 2018

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
Copy link

lsbbs commented Nov 4, 2018

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.

@ymgenesis
Copy link

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.

@rodrigoscoelho
Copy link

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

@lsbbs
Copy link

lsbbs commented Jan 23, 2019 via email

@Rello
Copy link
Contributor

Rello commented Feb 12, 2019

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

@cweinhofer
Copy link

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>

@benjivm
Copy link

benjivm commented Mar 28, 2019

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

@rawbertp
Copy link

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

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@Rello
Copy link
Contributor

Rello commented Jun 15, 2019

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

@subhead
Copy link

subhead commented Jun 25, 2019

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

@andrewkww
Copy link

andrewkww commented Jun 26, 2019

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.

@Af0x
Copy link
Author

Af0x commented Jun 26, 2019

As mentioned in the documentation setting

hide dot files = No

for your share fixes this issue. Thanks @andrewkww

@archont00
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: external storage
Projects
None yet
Development

No branches or pull requests