owncloud / core

:cloud: ownCloud web server core (Files, DAV, etc.)
https://owncloud.com
GNU Affero General Public License v3.0
8.4k stars 2.05k forks source link

SMB external storage broken: "Storage not available" #24460

Closed salfter closed 6 years ago

salfter commented 8 years ago
I use ownCloud to serve up Greyhole storage pool volumes. Since Greyhole sits on top of Samba, it follows that one would just have ownCloud talk to Samba directly. I've mounted the relevant shares on the underlying system and switched ownCloud from SMB external storage to local external storage as a workaround, but I'm pretty sure this qualifies as a regression. ### Steps to reproduce 1. configure an SMB share in external storage 2. switch back to "files" view 3. try to open the share (or try accessing it over WebDAV) ### Expected behavior Files in the share should be visible. ### Actual behavior In the web interface, a message up top appears: "Storage not available." WebDAV access fails as well. ### Server configuration **Operating system**: Gentoo Linux. `uname -a` returns the following: ``` Linux files 4.4.6-gentoo #1 SMP Mon Apr 25 08:10:31 PDT 2016 x86_64 AMD A4-3300 APU with Radeon(tm) HD Graphics AuthenticAMD GNU/Linux ``` **Web server:** Apache 2.4.18 **Database:** MySQL 5.6.28 **PHP version:** 5.6.20 **ownCloud version:** (see ownCloud admin page) 9.0.1 **Updated from an older ownCloud or fresh install:** updated from 8.2.3 **Where did you install ownCloud from:** Portage **Signing status (ownCloud 9.0 and above):** It complains about an extra file created by Gentoo's webapp-config utility, but that's all: ``` Technical information ===================== The following list covers which files have failed the integrity check. Please read the previous linked documentation to learn more about the errors and how to fix them. Results ======= - core - EXTRA_FILE - .webapp-owncloud-9.0.1 Raw output ========== Array ( [core] => Array ( [EXTRA_FILE] => Array ( [.webapp-owncloud-9.0.1] => Array ( [expected] => [current] => ) ) ) ) ``` **List of activated apps:** ``` The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php Enabled: - activity: 2.2.1 - calendar: 1.1 - comments: 0.2 - contacts: 1.2.0.0 - dav: 0.1.6 - federatedfilesharing: 0.1.0 - federation: 0.0.4 - files: 1.4.4 - files_external: 0.5.2 - files_pdfviewer: 0.8 - files_sharing: 0.9.1 - files_texteditor: 2.1 - files_trashbin: 0.8.0 - files_versions: 1.2.0 - files_videoplayer: 0.9.8 - firstrunwizard: 1.1 - gallery: 14.5.0 - music: 0.3.11 - notifications: 0.2.3 - ownnote: 1.07 - provisioning_api: 0.4.1 - systemtags: 0.2 - templateeditor: 0.1 - updatenotification: 0.1.0 Disabled: - encryption - external - notes - user_external - user_ldap ``` **The content of config/config.php:** ``` The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php { "system": { "instanceid": "ocd9b49d92ae", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "home.alfter.us" ], "datadirectory": "\/var\/www\/home.alfter.us\/htdocs\/owncloud\/data", "overwrite.cli.url": "https:\/\/home.alfter.us\/owncloud", "dbtype": "mysql", "version": "9.0.1.3", "dbname": "owncloud", "dbhost": "files", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "forcessl": true, "mail_smtpmode": "smtp", "mail_smtphost": "smtp.west.cox.net", "mail_smtpport": "587", "loglevel": "1", "mail_from_address": "scott", "mail_domain": "alfter.us", "overwritewebroot": "\/owncloud", "memcache.local": "\\OC\\Memcache\\APCu", "theme": "", "maintenance": false, "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "trashbin_retention_obligation": "auto", "filesystem_check_changes": "1" }, "apps": { "activity": { "enabled": "yes", "installed_version": "2.2.1", "types": "filesystem" }, "backgroundjob": { "lastjob": "2" }, "calendar": { "enabled": "yes", "installed_version": "1.1", "ocsid": "168707", "types": "" }, "comments": { "enabled": "yes", "installed_version": "0.2", "types": "logging" }, "contacts": { "enabled": "yes", "installed_version": "1.2.0.0", "ocsid": "168708", "types": "" }, "core": { "backgroundjobs_mode": "cron", "global_cache_gc_lastrun": "1436463001", "installedat": "1423445615.4399", "lastcron": "1462502702", "lastupdateResult": "{\"version\":{},\"versionstring\":{},\"url\":{},\"web\":{}}", "lastupdatedat": "1462502230", "oc.integritycheck.checker": "{\"core\":{\"EXTRA_FILE\":{\".webapp-owncloud-9.0.1\":{\"expected\":\"\",\"current\":false}}}}", "public_caldav": "calendar\/share.php", "public_calendar": "calendar\/share.php", "public_documents": "documents\/public.php", "public_files": "files_sharing\/public.php", "public_gallery": "gallery\/public.php", "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php", "remote_caldav": "dav\/appinfo\/v1\/caldav.php", "remote_calendar": "dav\/appinfo\/v1\/caldav.php", "remote_carddav": "dav\/appinfo\/v1\/carddav.php", "remote_contacts": "dav\/appinfo\/v1\/carddav.php", "remote_dav": "dav\/appinfo\/v2\/remote.php", "remote_files": "dav\/appinfo\/v1\/webdav.php", "remote_filesync": "files\/appinfo\/filesync.php", "remote_webdav": "dav\/appinfo\/v1\/webdav.php", "repairlegacystoragesdone": "yes" }, "dav": { "enabled": "yes", "installed_version": "0.1.6", "types": "filesystem" }, "documents": { "enabled": "no", "installed_version": "0.8.2", "ocsid": "168711", "types": "" }, "federatedfilesharing": { "enabled": "yes", "installed_version": "0.1.0", "types": "" }, "federation": { "enabled": "yes", "installed_version": "0.0.4", "types": "authentication" }, "files": { "cronjob_scan_files": "500", "enabled": "yes", "installed_version": "1.4.4", "types": "filesystem" }, "files_external": { "\/Books": "1423447141", "\/Downloads": "1423447379", "\/InstantUpload": "1423447221", "\/Movies": "1423447081", "\/Music": "1439925635", "\/Pictures": "1423531234", "\/TV Shows": "1423446884", "\/Torrents": "1423448490", "\/Video": "1441296000", "\/flac": "1449016825", "\/iso": "1423448420", "\/svndumps": "1423448448", "enabled": "yes", "installed_version": "0.5.2", "ocsid": "166048", "types": "filesystem" }, "files_locking": { "enabled": "no", "installed_version": "", "types": "filesystem" }, "files_pdfviewer": { "enabled": "yes", "installed_version": "0.8", "ocsid": "166049", "types": "" }, "files_sharing": { "enabled": "yes", "installed_version": "0.9.1", "types": "filesystem" }, "files_texteditor": { "enabled": "yes", "installed_version": "2.1", "ocsid": "166051", "types": "" }, "files_trashbin": { "enabled": "yes", "installed_version": "0.8.0", "types": "filesystem" }, "files_versions": { "enabled": "yes", "installed_version": "1.2.0", "types": "filesystem" }, "files_videoplayer": { "enabled": "yes", "installed_version": "0.9.8", "types": "" }, "files_videoviewer": { "enabled": "no", "installed_version": "0.1.3", "ocsid": "166054", "types": "" }, "firstrunwizard": { "enabled": "yes", "installed_version": "1.1", "ocsid": "166055", "types": "" }, "gallery": { "enabled": "yes", "installed_version": "14.5.0", "types": "" }, "music": { "enabled": "yes", "installed_version": "0.3.11", "ocsid": "164319", "types": "filesystem" }, "notes": { "enabled": "no", "installed_version": "2.0.1", "ocsid": "174554", "types": "" }, "notifications": { "enabled": "yes", "installed_version": "0.2.3", "types": "logging" }, "ownnote": { "enabled": "yes", "installed_version": "1.07", "ocsid": "168512", "types": "" }, "provisioning_api": { "enabled": "yes", "installed_version": "0.4.1", "types": "prevent_group_restriction" }, "search_lucene": { "enabled": "no", "installed_version": "0.5.3", "ocsid": "168709", "types": "filesystem" }, "systemtags": { "enabled": "yes", "installed_version": "0.2", "types": "logging" }, "templateeditor": { "enabled": "yes", "installed_version": "0.1", "types": "" }, "updatenotification": { "enabled": "yes", "installed_version": "0.1.0", "types": "" }, "updater": { "enabled": "no", "installed_version": "0.6", "types": "" }, "user_webdavauth": { "enabled": "no", "installed_version": "1.1.0.1", "ocsid": "166062", "types": "authentication" } } } ``` **Are you using external storage, if yes which one:** local/smb/sftp/... Was using SMB storage exclusively, but switched to local storage to get things working again **Are you using encryption:** yes/no At what level? It's served up over HTTPS (and HSTS is enabled). If you're referring to encrypted file storage, then no. **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... This problem does show up when I try to access files remotely over WebDAV. ### Client configuration **Browser:** Chrome **Operating system:** Windows or Linux...makes no difference ### Logs #### Web server error log access_log segment following an attempt at accessing an SMB share: (nothing in error_log) ``` 192.168.1.1 - - [05/May/2016:20:06:16 -0700] "PROPFIND /owncloud/remote.php/webdav/Books%20(Test) HTTP/1.1" 503 223 192.168.1.1 - - [05/May/2016:20:06:16 -0700] "GET /owncloud/index.php/apps/files_external/userglobalstorages/25 HTTP/1.1" 200 282 192.168.1.1 - - [05/May/2016:20:06:16 -0700] "PROPFIND /owncloud/remote.php/webdav/ HTTP/1.1" 207 16539 192.168.1.1 - - [05/May/2016:20:06:16 -0700] "GET /owncloud/index.php/apps/files/ajax/getstoragestats.php?dir=%2F HTTP/1.1" 200 198 192.168.1.1 - - [05/May/2016:20:06:16 -0700] "GET /owncloud/index.php/core/preview.png?file=%2Fowncloud-calendar-Days-off-from-work.ics&c=54d81bdf4b614&x=48&y=48&forceIcon=0 HTTP/1.1" 404 - 192.168.1.1 - - [05/May/2016:20:06:16 -0700] "GET /owncloud/index.php/core/preview.png?file=%2FDays+off+from+work_u4rr5mrd649q3olmjh2a3pd4ko%40group.calendar.google.com.ics&c=54d81be8c0e94&x=48&y=48&forceIcon=0 HTTP/1.1" 404 - 192.168.1.1 - - [05/May/2016:20:06:16 -0700] "GET /owncloud/index.php/core/preview.png?file=%2Fowncloud-calendar-Events.ics&c=54d81be01b25a&x=48&y=48&forceIcon=0 HTTP/1.1" 404 - 192.168.1.1 - - [05/May/2016:20:06:16 -0700] "GET /owncloud/index.php/core/preview.png?file=%2FScott+Alfter_salfter%40gmail.com.ics&c=54d81bf4022d4&x=48&y=48&forceIcon=0 HTTP/1.1" 404 - 192.168.1.1 - - [05/May/2016:20:06:16 -0700] "GET /owncloud/index.php/core/preview.png?file=%2FUS-Holidays.ics&c=54d81bf96cd5c&x=48&y=48&forceIcon=0 HTTP/1.1" 404 - 192.168.1.1 - - [05/May/2016:20:06:16 -0700] "GET /owncloud/index.php/core/preview.png?file=%2FownCloudUserManual.pdf&c=54d80e6ec5431&x=48&y=48&forceIcon=0 HTTP/1.1" 404 - ``` #### ownCloud log (data/owncloud.log) ``` {"reqId":"VywKecCoAXAAAB84l58AAACI","remoteAddr":"192.168.1.1","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Storage not available\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(903): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath('Books (Test)')\\n#1 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(334): Sabre\\\\DAV\\\\Server->getPropertiesForPath('Books (Test)', Array, 1)\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPropFind(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:PROPFIND', Array)\\n#5 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(55): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/remote.php(138): require_once('\\\/var\\\/www\\\/home.a...')\\n#8 {main}\",\"File\":\"\\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/connector\\\/sabre\\\/objecttree.php\",\"Line\":159,\"User\":\"salfter\"}","level":4,"time":"2016-05-06T03:07:37+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/Books%20(Test)","user":"salfter"} {"reqId":"VywKecCoAXAAAB83w7gAAAAV","remoteAddr":"192.168.1.1","app":"files_external","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\StorageNotAvailableException\",\"Message\":\"Unknown error (sh: --authentication-file=\\\/proc\\\/self\\\/fd\\\/3: No such file or directory)\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/smb.php(157): OC\\\\Files\\\\Storage\\\\SMB->getFileInfo('')\\n#1 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/common.php(434): OC\\\\Files\\\\Storage\\\\SMB->stat('')\\n#2 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/smb.php(391): OC\\\\Files\\\\Storage\\\\Common->test()\\n#3 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/config.php(231): OC\\\\Files\\\\Storage\\\\SMB->test(false)\\n#4 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/files_external\\\/controller\\\/storagescontroller.php(256): OC_Mount_Config::getBackendStatus('\\\\\\\\OC\\\\\\\\Files\\\\\\\\Stora...', Array, false)\\n#5 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/files_external\\\/controller\\\/userglobalstoragescontroller.php(117): OCA\\\\Files_External\\\\Controller\\\\StoragesController->updateStorageStatus(Object(OCA\\\\Files_external\\\\Lib\\\\StorageConfig))\\n#6 [internal function]: OCA\\\\Files_External\\\\Controller\\\\UserGlobalStoragesController->show(25)\\n#7 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/http\\\/dispatcher.php(159): call_user_func_array(Array, Array)\\n#8 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/http\\\/dispatcher.php(89): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\Files_External\\\\Controller\\\\UserGlobalStoragesController), 'show')\\n#9 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/app.php(110): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\Files_External\\\\Controller\\\\UserGlobalStoragesController), 'show')\\n#10 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/routing\\\/routeactionhandler.php(45): OC\\\\AppFramework\\\\App::main('UserGlobalStora...', 'show', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#11 [internal function]: OC\\\\AppFramework\\\\routing\\\\RouteActionHandler->__invoke(Array)\\n#12 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/route\\\/router.php(276): call_user_func(Object(OC\\\\AppFramework\\\\routing\\\\RouteActionHandler), Array)\\n#13 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/base.php(882): OC\\\\Route\\\\Router->match('\\\/apps\\\/files_ext...')\\n#14 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/index.php(39): OC::handleRequest()\\n#15 {main}\",\"File\":\"\\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/smb.php\",\"Line\":119}","level":3,"time":"2016-05-06T03:07:37+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files_external\/userglobalstorages\/25","user":"salfter"} ``` #### Browser log `````` client.js?v=a10ba7d…:183 PROPFIND https://home.alfter.us/owncloud/remote.php/webdav/Books%20(Test) 503 (Service Unavailable)dav.Client.request @ client.js?v=a10ba7d…:183dav.Client.propFind @ client.js?v=a10ba7d…:80Client.getFolderContents @ client.js?v=a10ba7d…:402FileList.reload @ filelist.js?v=a10ba7d…:1422FileList.changeDirectory @ filelist.js?v=a10ba7d…:1321(anonymous function) @ fileactions.js?v=a10ba7d…:622FileList._onClickFile @ filelist.js?v=a10ba7d…:572x.event.dispatch @ jquery.min.js?v=a10ba7d…:5v.handle @ jquery.min.js?v=a10ba7d…:5 preview.png:1 GET https://home.alfter.us/owncloud/index.php/core/preview.png?file=%2Fowncloud-calendar-Days-off-from-work.ics&c=54d81bdf4b614&x=48&y=48&forceIcon=0 404 (Not Found) preview.png:1 GET https://home.alfter.us/owncloud/index.php/core/preview.png?file=%2FDays+off…d4ko%40group.calendar.google.com.ics&c=54d81be8c0e94&x=48&y=48&forceIcon=0 404 (Not Found)``` ``````
PVince81 commented 8 years ago

What's this:

--authentication-file=\\\/proc\\\/self\\\/fd\\\/3: No such file or directory

CC @icewind1991

PVince81 commented 8 years ago

also CC @Xenopathic

RobinMcCorkell commented 8 years ago

If you're using SMB storages it's highly recommended to install the libsmbclient-php extension, which brings a HUGE performance boost

salfter commented 8 years ago

libsmbclient-php isn't in Portage, but I created an ebuild for it and put it in my overlay. v0.7.0 is now installed. After restarting php-fpm, the SMB share configured in ownCloud is now working.

It would seem that the codepath that doesn't use libsmbclient-php is somehow broken. Should it be considered deprecated? On Gentoo, this would easily be sidestepped by requiring libsmbclient-php if the samba USE flag is enabled...but now we're straying into a distro-packaging issue. Will post to Gentoo's bug tracker shortly.

salfter commented 8 years ago

https://bugs.gentoo.org/show_bug.cgi?id=582296

RobinMcCorkell commented 8 years ago

It's a bug with ownCloud (or more specifically icewind1991/SMB, the library we use), not Gentoo. It should work with smbclient directly, however it's strongly recommended to always use libsmbclient-php if possible. Feel free to refer to this comment in the Gentoo bug tracker, since everything there is compiled from source it makes sense to just go for libsmbclient-php directly.

PVince81 commented 8 years ago

any more luck with 9.0.5 ?

victorbw commented 8 years ago

im having the same issue with 9.0.5, but with other system, so i assume that it may be an error in OC itself.

i've posted an issue once on central first, to see if anyone might be able to tell if its an issue within my configuration or not: https://central.owncloud.org/t/owncloud-9-0-x-smb-shares-disappear-reappear-server-2012r2/1743

salfter commented 8 years ago

any more luck with 9.0.5 ?

I'm currently on 9.1.1, and haven't had any problems since I added libsmbclient-php.

victorbw commented 8 years ago

well, im using libsmbclient as well, but with php7:

apt-get install libsmbclient-dev -y
pecl install smbclient

echo 'extension=smbclient.so' >> /etc/php/7.0/apache2/php.ini

but i didnt move to 9.1.1 yet due to some issues we had with 9.1 stable.

any idea where to look at?

jvillafanez commented 8 years ago

@victorbw if your issue doesn't match this one, please open a new issue (filling the template). I'm specifically talking about this log:

{"reqId":"VywKecCoAXAAAB84l58AAACI","remoteAddr":"192.168.1.1","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Storage not available\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(903): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath('Books (Test)')\\n#1 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(334): Sabre\\\\DAV\\\\Server->getPropertiesForPath('Books (Test)', Array, 1)\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPropFind(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:PROPFIND', Array)\\n#5 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(55): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/remote.php(138): require_once('\\\/var\\\/www\\\/home.a...')\\n#8 {main}\",\"File\":\"\\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/connector\\\/sabre\\\/objecttree.php\",\"Line\":159,\"User\":\"salfter\"}","level":4,"time":"2016-05-06T03:07:37+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/Books%20(Test)","user":"salfter"}
{"reqId":"VywKecCoAXAAAB83w7gAAAAV","remoteAddr":"192.168.1.1","app":"files_external","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\StorageNotAvailableException\",\"Message\":\"Unknown error (sh: --authentication-file=\\\/proc\\\/self\\\/fd\\\/3: No such file or directory)\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/smb.php(157): OC\\\\Files\\\\Storage\\\\SMB->getFileInfo('')\\n#1 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/common.php(434): OC\\\\Files\\\\Storage\\\\SMB->stat('')\\n#2 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/smb.php(391): OC\\\\Files\\\\Storage\\\\Common->test()\\n#3 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/config.php(231): OC\\\\Files\\\\Storage\\\\SMB->test(false)\\n#4 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/files_external\\\/controller\\\/storagescontroller.php(256): OC_Mount_Config::getBackendStatus('\\\\\\\\OC\\\\\\\\Files\\\\\\\\Stora...', Array, false)\\n#5 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/files_external\\\/controller\\\/userglobalstoragescontroller.php(117): OCA\\\\Files_External\\\\Controller\\\\StoragesController->updateStorageStatus(Object(OCA\\\\Files_external\\\\Lib\\\\StorageConfig))\\n#6 [internal function]: OCA\\\\Files_External\\\\Controller\\\\UserGlobalStoragesController->show(25)\\n#7 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/http\\\/dispatcher.php(159): call_user_func_array(Array, Array)\\n#8 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/http\\\/dispatcher.php(89): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\Files_External\\\\Controller\\\\UserGlobalStoragesController), 'show')\\n#9 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/app.php(110): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\Files_External\\\\Controller\\\\UserGlobalStoragesController), 'show')\\n#10 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/routing\\\/routeactionhandler.php(45): OC\\\\AppFramework\\\\App::main('UserGlobalStora...', 'show', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#11 [internal function]: OC\\\\AppFramework\\\\routing\\\\RouteActionHandler->__invoke(Array)\\n#12 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/private\\\/route\\\/router.php(276): call_user_func(Object(OC\\\\AppFramework\\\\routing\\\\RouteActionHandler), Array)\\n#13 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/lib\\\/base.php(882): OC\\\\Route\\\\Router->match('\\\/apps\\\/files_ext...')\\n#14 \\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/index.php(39): OC::handleRequest()\\n#15 {main}\",\"File\":\"\\\/var\\\/www\\\/home.alfter.us\\\/htdocs\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/smb.php\",\"Line\":119}","level":3,"time":"2016-05-06T03:07:37+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files_external\/userglobalstorages\/25","user":"salfter"}

If you open a new issue, ping me there so I can have a look.

victorbw commented 8 years ago

obviously its not the same error, thank you for your advice!

PVince81 commented 8 years ago

@jvillafanez didn't we talk about php7 support for libsmbclient recently, or at least an upstream ticket ?

jvillafanez commented 8 years ago

I'm not sure. I don't think we should do anything on our side for php7. Users should compile https://github.com/eduardok/libsmbclient-php library (version 0.8.0 at least) or check if their linux distribution provides the package ready with 0.8.0 version.

As long as the library supports php7 it's fine.

PVince81 commented 7 years ago

@jvillafanez close ?

frkca commented 7 years ago

@jvillafanez the 0.8.0 version of libsmbclient-php from Ubuntu 16.04 repository did not work for me - had to compile the linked version against otherwise standard versions of PHP7.0 and libsmbclient. Just need to mention to create a symlink for the actual libsmb in the directory where this version expects it. libsmbclient:amd64 2:4.3.11+dfsg-0ubuntu0.16.04.3 libsmbclient-dev:amd64 2:4.3.11+dfsg-0ubuntu0.16.04.3 smbclient 2:4.3.11+dfsg-0ubuntu0.16.04.3

Did not have a chance to look into where the problem resides - but it's common to nextcloud as well.

jvillafanez commented 7 years ago

@frkca please submit as much information as possible about your system. Right now I'm not able to reproduce the issue using the libsmbclient-php library, and if I can't reproduce the issue it's almost impossible to fix it if it's really an ownCloud's problem. In addition, check if it works with a virtual appliance to isolate the issue as much as possible. You can download it from the ownCloud's download page.

victorbw commented 7 years ago

@frkca

did you try to use these commands instead?

apt-get install libsmbclient-dev -y
pecl install smbclient
echo 'extension=smbclient.so' >> /etc/php/7.0/apache2/php.ini

just give it a try, it worked perfectly on my system (Ubuntu 16.04.2 LTS, apache2, mysql, NC 11.0.2).

skyfox675 commented 7 years ago

apt-get install libsmbclient-dev -y pecl install smbclient echo 'extension=smbclient.so' >> /etc/php/7.0/apache2/php.ini

Above verified on Ubuntu 16.04.2 LTS, apache2, mysql, NC 11.0.2. In addition with IIS 10 ARR 3.0.

PVince81 commented 7 years ago

OC is using the same SMB libs, so it's likely mostly about the versions of:

PVince81 commented 6 years ago

Please reopen if the issue persists with 10.0.4 and check the versions of the above components.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.