Issue with File Manager and Collabora

I’m having an issue with the File Manager. It looks like I can upload files but after upload I can’t seem to find those files anywhere on the file system. If I upload an office document and I try to edit it with Collabora, I get an error that the file cannot be found. If I go under File Manager Menu --> Start Folder I get the following error:

The requested path /var/lib/egroupware/domain/files/ is not available.

The folder is definitely in the file system and when I go to that folder there are two other directories in it, “activesync” and “sqlfs”. The owner of that folder is www-data. I’ve tried changing the permissions to 755 and 777 with the same results.

I would appreciate some help with this.

Thanks

Hi deeztek.

is this a new (packet-)installation?
Which webserver?
Can you find more in the webserver-error-log?
No messages when uploading the file?

Can you please make a hard copy of the upload?

You have several domains? Otherwise “default” should be there.

Greetings
Stefan

No, this is not a new installation. Haven’t used the File Manager app, but recently we had the need for it.

This is Apache 2.4. There are no messages in the error.log file.

I don’t understand what you mean by make a hard copy of the upload. Can you clarify?

I do have several domains.

Thanks
Dino

I was finally able to get some errors from the error log. I upgraded to 17.1.003 and now I’m getting a different error when I try to upload files:

Error Uploading File!

This error generates the error logs below:

[Tue Aug 14 10:58:56.632666 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #2 [internal function]: EGroupware\Api\Vfs\Sqlfs\StreamWrapper->stream_open(‘sqlfs://otherdomain.tld’, ‘w’, 0, ‘/home/support/3…’), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.632678 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #3 /usr/share/egroupware/api/src/Vfs/StreamWrapper.php(321): fopen(‘sqlfs://otherdomain.tld’, ‘wb’, false, Resource id #3), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.632691 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #4 [internal function]: EGroupware\Api\Vfs\StreamWrapper->stream_open(‘vfs://default/h…’, ‘wb’, NULL, NULL), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.632702 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #5 /usr/share/egroupware/api/src/Vfs.php(2165): copy(’/tmp/egw_hWpIM9’, ‘vfs://default/h…’), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.632713 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #6 /usr/share/egroupware/filemanager/inc/class.filemanager_ui.inc.php(1515): EGroupware\Api\Vfs::copy_uploaded(’/tmp/egw_hWpIM9’, ‘/home/support/3…’, NULL, false), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.632725 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #7 [internal function]: filemanager_ui::ajax_action(‘upload’, Array, ‘/home/support’), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.632738 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #8 /usr/share/egroupware/api/src/Json/Request.php(179): call_user_func_array(Array, Array), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.632748 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #9 /usr/share/egroupware/api/src/Json/Request.php(91): EGroupware\Api\Json\Request->handleRequest(‘filemanager_ui:…’, Array), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.632759 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #10 /usr/share/egroupware/json.php(119): EGroupware\Api\Json\Request->parseRequest(‘filemanager_ui:…’, ‘{“request”:{"pa…’), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.632770 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #11 {main}, referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.632788 2018] [:error] [pid 8015] [client 192.168.10.242:58002] # Instance=otherdomain.tld, User=support, Request=POST https://ewa.domain.tld/egroupware/json.php?menuaction=filemanager_ui::ajax_action, User-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0, referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633358 2018] [:error] [pid 8015] [client 192.168.10.242:58002] EGroupware\Api\Vfs\Sqlfs\StreamWrapper::stream_open(sqlfs://otherdomain.tld/home/support/3cx_cheat_sheet.docx,w,0) NO stream, returning false!, referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633436 2018] [:error] [pid 8015] [client 192.168.10.242:58002] PHP Warning: fopen(sqlfs://otherdomain.tld/home/support/3cx_cheat_sheet.docx): failed to open stream: “EGroupware\Api\Vfs\Sqlfs\StreamWrapper::stream_open” call failed in /usr/share/egroupware/api/src/Vfs/StreamWrapper.php on line 321, referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633475 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #1 /usr/share/egroupware/api/src/Vfs/StreamWrapper.php(321): fopen(‘sqlfs://otherdomain.tld’, ‘wb’, false, Resource id #3), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633488 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #2 [internal function]: EGroupware\Api\Vfs\StreamWrapper->stream_open(‘vfs://default/h…’, ‘wb’, NULL, NULL), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633499 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #3 /usr/share/egroupware/api/src/Vfs.php(2165): copy(’/tmp/egw_hWpIM9’, ‘vfs://default/h…’), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633602 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #4 /usr/share/egroupware/filemanager/inc/class.filemanager_ui.inc.php(1515): EGroupware\Api\Vfs::copy_uploaded(’/tmp/egw_hWpIM9’, ‘/home/support/3…’, NULL, false), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633616 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #5 [internal function]: filemanager_ui::ajax_action(‘upload’, Array, ‘/home/support’), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633627 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #6 /usr/share/egroupware/api/src/Json/Request.php(179): call_user_func_array(Array, Array), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633638 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #7 /usr/share/egroupware/api/src/Json/Request.php(91): EGroupware\Api\Json\Request->handleRequest(‘filemanager_ui:…’, Array), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633649 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #8 /usr/share/egroupware/json.php(119): EGroupware\Api\Json\Request->parseRequest(‘filemanager_ui:…’, ‘{“request”:{"pa…’), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633660 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #9 {main}, referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633675 2018] [:error] [pid 8015] [client 192.168.10.242:58002] # Instance=otherdomain.tld, User=support, Request=POST https://ewa.domain.tld/egroupware/json.php?menuaction=filemanager_ui::ajax_action, User-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0, referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633728 2018] [:error] [pid 8015] [client 192.168.10.242:58002] PHP Warning: copy(vfs://default/home/support/3cx_cheat_sheet.docx): failed to open stream: “EGroupware\Api\Vfs\StreamWrapper::stream_open” call failed in /usr/share/egroupware/api/src/Vfs.php on line 2165, referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633754 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #1 /usr/share/egroupware/api/src/Vfs.php(2165): copy(’/tmp/egw_hWpIM9’, ‘vfs://default/h…’), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633767 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #2 /usr/share/egroupware/filemanager/inc/class.filemanager_ui.inc.php(1515): EGroupware\Api\Vfs::copy_uploaded(’/tmp/egw_hWpIM9’, ‘/home/support/3…’, NULL, false), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633778 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #3 [internal function]: filemanager_ui::ajax_action(‘upload’, Array, ‘/home/support’), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633789 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #4 /usr/share/egroupware/api/src/Json/Request.php(179): call_user_func_array(Array, Array), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633800 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #5 /usr/share/egroupware/api/src/Json/Request.php(91): EGroupware\Api\Json\Request->handleRequest(‘filemanager_ui:…’, Array), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633819 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #6 /usr/share/egroupware/json.php(119): EGroupware\Api\Json\Request->parseRequest(‘filemanager_ui:…’, ‘{“request”:{"pa…’), referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633831 2018] [:error] [pid 8015] [client 192.168.10.242:58002] #7 {main}, referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633845 2018] [:error] [pid 8015] [client 192.168.10.242:58002] # Instance=otherdomain.tld, User=support, Request=POST https://ewa.domain.tld/egroupware/json.php?menuaction=filemanager_ui::ajax_action, User-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0, referer: https://ewa.domain.tld/egroupware/index.php?cd=yes
[Tue Aug 14 10:58:56.633881 2018] [:error] [pid 8015] [client 192.168.10.242:58002] EGroupware\Api\Vfs::copy_uploaded(/tmp/egw_hWpIM9, /home/support/3cx_cheat_sheet.docx, NULL) returning FALSE, referer: https://ewa.domain.tld/egroupware/index.php?cd=yes

I almost all cases we have a similar problems it is either:

  • files directory is set wrong (default /var/lib/egroupware/default/files)
  • owernship/permissions are wrong (chown -R webserver-user /var/lib/egroupware/default/files)
  • open_basedir does not include the changed folder (does not show in your log)

Ralf

  1. The files directory is set correctly. I have verified that the path exists.

  2. I ran chown -R www-data in /var/lib/egroupware/domain/files

  3. I included /var/lib/egroupware/domain/files in the open_basedir:

php_admin_value open_basedir /usr/share/egroupware:/var/lib/egroupware:/tmp:/usr/lib/ssl/certs:/usr/share/ca-certificates:/var/lib/egroupware/domain/files

What else could be wrong? Are there certain permissions that have to be set in that directory?

Thanks

open_basedir already included you directory, as it is included the default /var/lib/egroupware, which includes all sub-directories

Do you use RHEL with SELinux, that can have a similar effect. If yes try switching it off.

Ralf

I noticed it was included, but I added it just in case I needed to go deeper the folder structure. I don’t use RHEL with SELinux. I use Ubuntu 16.04 LTS. Any other suggestions?

Under EGW setup, I get “Your files directory ‘/var/lib/egroupware/domain/files’ Does not exist” even though it exists and www-data user is the owner. Even if I try a different directory, I get the same error. Documentation on this seems to be non-existent unless I’m missing something. Collabora integration is pointless without allowing the users to upload files to EGW.

What am I missing here? Is this a thing where I should purchase support to get it resolved?

I would certainly appreciate some clarification here.

Thanks

I apologize for the interference. You have 2 directories where files are stored. I would be grateful if you show an example catalog activesync. There may be a problem with the difference in file retention rules. I had a similar problem and I solved it by fixing the source code of the system. I do not remember a specific place, but I’ll try to find it. I know exactly what I changed “ino” permission.

Thanks for trying to help. I would be happy to show you, but I’m not clear by what you mean by “catalog activesync”. Can you clarify?

Thanks a lot