External storage SMB/CIFS root directory does not behave as it should
Steps to reproduce
- Configure SMB/CIFS root directory as External storage (e.g. in my case it would be D:\ as DiskD)
- Go to "All files", it doesn't appear there, only in "External storage" subfolder.
- Go to "All files" -> "External storage" try to open mounted CIFS root directory -> you'll be moved to "All files"
Expected behaviour
Mounted External storage SMB/CIFS expected to appear in the "All files" folder and have to be accessible.
Actual behaviour
Mounted External storage SMB/CIFS appear in "All files"->"External storage" and doesn't accessible - you'll be moved to the root of "All files". But if I mount any subfolder of this root SMB/CIFS - it will be mounted without any issues. E.g. if I mount D:\_Video\ as DiskD_Video it will appear in "All files" and will be accessible. Screenshots: https://snag.gy/Q0zfPj.jpg https://snag.gy/Y0lMH6.jpg https://snag.gy/wLG7M3.jpg
Server configuration
Windows 8.1 Pro - Nextcloud VM - Ubuntu Server 16.04.1: Pre-installed Nextcloud (PHP 7) from https://cloud.techandme.se/index.php/s/lTjoMr5smSYHIiM/download?path=%2F&files=Nextcloud_Community_VM_PRODUCTION.rar
Client configuration
Browser: Firefox 47, Chrome 54, IE 11
Operating system: Windows, Android
Logs
Nextcloud log (data/nextcloud.log)
Nextcloud log
{"reqId":"3001zwteH3spgvF3+If9","remoteAddr":"192.168.0.82","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path '' is not accessible or present !!!","level":0,"time":"2016-11-01T16:13:05+00:00","method":"PROPFIND","url":"\/nextcloud\/remote.php\/webdav\/","user":"ncadmin"}
{"reqId":"3001zwteH3spgvF3+If9","remoteAddr":"192.168.0.82","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path '' is not accessible or present !!!","level":0,"time":"2016-11-01T16:13:05+00:00","method":"PROPFIND","url":"\/nextcloud\/remote.php\/webdav\/","user":"ncadmin"}
{"reqId":"61otO5QIJ7DG51MzG2Vw","remoteAddr":"192.168.0.82","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path '' is not accessible or present !!!","level":0,"time":"2016-11-01T16:13:21+00:00","method":"PROPFIND","url":"\/nextcloud\/remote.php\/webdav\/DiskD","user":"ncadmin"}
{"reqId":"61otO5QIJ7DG51MzG2Vw","remoteAddr":"192.168.0.82","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 404 File with name DiskD could not be located\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotFound\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(903): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath('DiskD')\\n#1 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(334): Sabre\\\\DAV\\\\Server->getPropertiesForPath('DiskD', Array, 1)\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPropFind(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:PROPFIND', Array)\\n#5 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(60): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/var\\\/www\\\/nextcloud\\\/remote.php(165): require_once('\\\/var\\\/www\\\/nextcl...')\\n#8 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ObjectTree.php\",\"Line\":173,\"User\":\"ncadmin\"}","level":0,"time":"2016-11-01T16:13:21+00:00","method":"PROPFIND","url":"\/nextcloud\/remote.php\/webdav\/DiskD","user":"ncadmin"}
{"reqId":"jNotof9STpft6B5nVLmc","remoteAddr":"192.168.0.82","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path '' is not accessible or present !!!","level":0,"time":"2016-11-01T16:13:21+00:00","method":"PROPFIND","url":"\/nextcloud\/remote.php\/webdav\/","user":"ncadmin"}
{"reqId":"jNotof9STpft6B5nVLmc","remoteAddr":"192.168.0.82","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path '' is not accessible or present !!!","level":0,"time":"2016-11-01T16:13:21+00:00","method":"PROPFIND","url":"\/nextcloud\/remote.php\/webdav\/","user":"ncadmin"}
{"reqId":"CParj+JyB9UknEtF3xnD","remoteAddr":"192.168.0.82","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path '' is not accessible or present !!!","level":0,"time":"2016-11-01T16:13:28+00:00","method":"PROPFIND","url":"\/nextcloud\/remote.php\/webdav","user":"ncadmin"}
@icewind1991 anything wrong with mounting a partition root?
Hi, Joas. Yes, a partition root is not mounted properly only subfolders. You may see it on the screenshots attached in my first message. Best regards, Igor.
Confirm the problem. It occurs when using shares not on disk C. I think the code is used incorrectly. 'smbclient allinfo "."' in function stat($path) on /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Share.php. I do not have the knowledge to debug and make a patch...
I confirm - the problem is still exist. This problem occurs while using any disk also on disk C.
https://www.evernote.com/shard/s69/sh/ceeed8fa-69d7-4dda-b64e-aa0ca1dd5399/f652c5c234fab70c99bed1e29eddae61 iG8R. Do it as shown on the second line. Will work with the disk C. Then change the link to the disk D and stop working.
@midaw1 Sorry, I don't have Evernote account and I don't want to create an account there, please, upload your screenshot somewhere else, e.g. https://snag.gy/
I'm sorry, the link was a curve. Try to go for a new one. Placed in the same top.
I am found problem. smbclient + "allinfo " not work on share from disk D,E,.... Solution to the problem is to use smbclient.so in php.ini.
I confirm the problem is reproducible. When you go in External Storage and click on the share folder, WebDAV returns a 404 not found in the Google Chrome console. As soon as you select a sub folder not in the root directory of an hard drive, the problem doesn't occur.
I would like to mention that smbclient.so is registered in php.ini, so I guess using it doesn't fix the problem. I am using Ubuntu Server 16.04.1 LTS x64. The file server is a Windows Server 2016 Core Datacenter.
there are several php.ini. moreover desirable to use the fpm. smbclient.so problem takes exactly. check script phpinfo (), that you have loaded smbclient. and not included fpm.
I am not really sure to understand what you mean. The only thing I have done is to enable the module using the command "phpenmod smbclient", then restarting Apache. When I look in /etc/php/7.0/apache2/conf.d/20-smbclient.ini, there is only one line and it's extension=smbclient.so, which is good right?
one last line in /etc/php/7.0/cli/php.ini or /etc/php/7.0/fpm/php.ini or /etc/php/7.0/apache2/php.ini... I always put the do not understand the features and it works
None of the three files you've specified contains the line "extension=smbclient.so". Folder fpm doesn't exist for me. "You always put the do not understand[...]" what? I don't understand what you are trying to say. :/
Add to all these files that line. My English is poor. I sit with a dictionary ... Sorry
So you want me to add the line "extension=smbclient.so" into all php.ini file?
exactly... and restart server.
Hi,
This is not working and doesn't change anything to the behavior. I still receive a 404 not found from the WebDAV module when tempting to browse the SMB share through the menu "External Storage". This is what makes NextCloud automatically redirect to "All files" as described by @iG8R .
I too have this issue. Have there been any further advances? I also logged the issue on the OwnCloud forum a while ago but got nowhere. Kind regards, James
Hi,
Nothing new on my side. I end up creating an additional SMB share for I wanted to do. Seems like NC 11 is out, maybe this corrects the issue?
Dave
Ah, so you just settled on having to have your share as a subfolder...? I'm running 11 and can confirm the issue is still present. :-( Kind regards, James