Collabora Online and SMB/CIFS

Steps to reproduce

  1. Create SMB / CIFS external storage with option “Log-In credentials, save in session”
  2. Use Collabora online to open any Office file from this storage.

Expected behaviour

Document opens in Collabora Office.

Actual behaviour

You receive a message: "Failed to read document from storage. Please contact your storage server ( administrator.

Server configuration

Operating system:
CentOS Linux release 7.7.1908

Web server:
Apache 2.4.6

MariaDB 5.5.64

PHP version:

ownCloud version: (see ownCloud admin page)

Updated from an older ownCloud or fresh install:
Fresh install

Where did you install ownCloud from:

Other software:
Collabora Online 2.2.0

Additional info:
Everything works fine when I create SMB / CIFS external storage with option “Username and Password”. I may be wrong, but I think that it means that Owncloud can’t translate credentials to Collabora Online.

I, also, see this in log:
Dec 25 14:31:28 my-host-name ownCloud[6981]: [XgNIkMidtdBX5PI3n0IqrgAAAAM][IP.IP.IP.IP][1E302CBD-16AE-4A25-8943-D2399C1BBE21][richdocuments][GET][/index.php/apps/richdocuments/wopi/files/2355_ocpwuq48hvp9_0_0?access_token=vnMR6djYyacvhuirZMUitAHK9YPrMvPS&access_token_ttl=0&reuse_cookies=_ym_d%3D1571316561%3A_ga%3DGA1.2.643618832.1548410423%3A_ym_uid%3D1548…7902%3Aocp…vp9%3D0gk2eosm2h227sbnq17d0pj50t%3Aoc_sessionPassphrase%3DNppgeuDF07Pp%2F6W…Ut%2FS3%2F8pnH1ZDaMnv…cooQfJPYsmdlJfJMg0WDsLBPYMmRkDzH2P&permission=edit] wopiCheckFileInfo(): Could not retrieve file

I found that:
If in DocumentController.php I change this:

if (!$this->appConfig->encryptionEnabled()) {
                 // Set session for a user

to this (add just one line):

 if (!$this->appConfig->encryptionEnabled()) {
                  // Set session for a user
                  \OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'password' => 'myuserpassword']);

everything starts working for my session only (because of the constant ‘myuserpassword’)

How can I get saved for SMB connection password and just insert it here for current user session?

1 Like


maybe you could ask the app author of the Collabora app at if it is possible to make the app compatible with this “Log-In credentials, save in session” option?

1 Like

Thank you for the advice.
I asked there, but, as you understand, password is saved somewhere in the bowels of the OwnCloud. And there must by way to extract it (smb/cifs connection do it every time), some code, like $user->getUID() for ID.
If someone can help me with it that’ll be a great workaround for me.


i don’t think this is the case if i’m understanding the following correctly:

These are not stored anywhere on the server, but rather in the user session, giving increased security.

Thank you!
I already understood that I’d asked about Enterprise Features using Community Edition.