Document server fails with "./x2t: Permission denied"
Hey, all. I have updated my Nextcloud instance from 16 to 18. I uninstalled the OnlyOffice app, then reinstalled it. After doing that, I installed the Community Document Server app. Whenever I click on a .doc or .docx file, I get the error stated in the subject.
Please let me know if you need me to pull any logs and I will gladly do so.
Same here, updated from 17>18

I got the same error and for me it was a permission problem, installed the app from within Nextcloud, I had the following in the logs:
Error documentserver_community OCA\DocumentServer\Document\DocumentConversionException: sh: ./x2t: Permission denied
Which was fixed by:
$ cd /var/www/vhost.server.domain/htdocs/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/
$ chmod u+x docbuilder x2t
Same with the official 18.0.0RC2-apache Docker image.
I also just now upgraded from 17 to 18.
Thank you, @tgurr - I had similar errors in my logs when I tried to launch a newly installed OnlyOffice Community Edition of Nextcloud 18 and I can confirm a chmod u+x docbuilder x2t in apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/ fixes that.
@tgurr Thank you, this got me closer to a solution.
However, when I input this, it switched from a "Permission Denied" error to an "x2t not found" error.. Strangest thing. I am running my installation through docker, which may be the difference.
cd /var/www/nextcloud/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/ chmod u+x docbuilder x2t
fixes the error "OCA\DocumentServer\Document\DocumentConversionException: sh: 1: ./x2t: Permission denied"

But it doesn't fix the main issue "Community document server is not supported for this instance, please setup and configure an external document server"
I fixed it by:
- Deactivating and uninstalling OnlyOffice and the document server
- Reinstalling OnlyOffice
- Reinstalling Document Server
- Applying the chmod fix by @tgurr
It fixed the permission denied log-entry but not the the "not supported" issue. I also tried the solution @xorbital suggested.
I am running the official nextcloud:latest docker container behind a reverse proxy. Could that be an issue? There is a entry in the onlyoffice settings called "Service address" for the documentserver. The reverse proxy does forward that address to the docker container but I don't know if the docker image handles that correctly. On the other hand, the "permission denied" log entry shouldn't occur if the documentserver could not be accessed...
Thanks, but how can I realize the fix if my NC is running with a Webhoster: Where do I have to go and enter this? $ cd/var/www/vhost.server.domain/htdocs/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/ $ chmod u+x docbuilder x2t
Is it likely that there will be an update vor the apps that solve the problem without manually fixing it?
Thank you, @tgurr - I had similar errors in my logs when I tried to launch a newly installed OnlyOffice Community Edition of Nextcloud 18 and I can confirm a
chmod u+x docbuilder x2tinapps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/fixes that.
Same, after changing the permissions of the x2t file based on @tgurr and @xorbital 's advice, OnlyOffice hangs at with spinning wheel with "document loading" and there's a Cloudn't create temp folder message in the NextCloud log.
OCA\DocumentServer\Document\DocumentConversionException: Couldn't create temp folder
OCP\AutoloadNotAllowedException: Autoload path not allowed: /var/www/nextcloud/apps/onlyoffice/lib/appconfig.php
I got exactly the same issue. I updated manually (Downloading ZIP, copying old config.php and run occ upgrade) from NC 17 (latest patchlevel) to NC 18.
I installed the Community Document Server App (which i did not found in any officlal documentation) and installed ONLYOFFICE-App.
I even tried the permission fix by @tgurr without success. I'm still getting the errormessage "Community document server is not supported for this instance, please setup and configure an external document server"
Edit: Using Ubuntu 16.04 here.
$ cd /var/www/vhost.server.domain/htdocs/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/ $ chmod u+x docbuilder x2t
For CentOS, RedHat & selinux distro do as root in addition to above
setsebool -P httpd_unified 1 ausearch -c 'x2t' --raw | audit2allow -M my-x2t semodule -i my-x2t.pp
Same problem here.. the "chmod fix" fixes only the error message but not the "Community document server is not supported for this instance, please setup and configure an external document server"
message.
I also deleted and reinstalled both apps, but it didnt help. Same config runs fine in NC18 RC2..thats strange. I also have done a manual upgrade from NC18 RC2 to NC18.
OS: Centos7 x64
Same issue here. I manually upgraded from 17.0.1 to 18.0.0, installed ONLYOFFICE then Community Document Server, ran the chmod fix. I'm running NextCloud on Ubuntu 18.04 behind a Citrix Netscaler doing SSL offloading.
I'm having this same problem, and unfortunately the solution posted by @tgurr didn't work for me.
0.1.2 should fix most of the "permission denied" errors.
For the sake of keeping the overview, if you're getting "Community document server not supported" errors with different causes in the log, please open a separate issue.
0.1.2 should fix most of the "permission denied" errors.
For the sake of keeping the overview, if you're getting "Community document server not supported" errors with different causes in the log, please open a separate issue.
It also fixed the "Community document server is not supported for this instance, please setup and configure an external document server" error for me! Nice!
Edit: Now if i click on an Office-Document in the Webinterface its showing just an white page an nothing else happens. If i do an manual refresh of the page, "Onlyoffice" is loading and i can edit/view the file!
Edit2: My issue seems to be: https://github.com/nextcloud/documentserver_community/issues/13
Everything working now, thanks!
0.1.2 should fix most of the "permission denied" errors.
For the sake of keeping the overview, if you're getting "Community document server not supported" errors with different causes in the log, please open a separate issue.
confirmed, version 0.1.2 works for me. :) thanks!
Unfortunately I'm still getting the "Community document server is not supported for this instance, please setup and configure an external document server" error, but there are not any entires in my log, even with debug enabled. Any ideas where I should start trouble shooting?
Unfortunately I'm still getting the "Community document server is not supported for this instance, please setup and configure an external document server" error, but there are not any entires in my log, even with debug enabled. Any ideas where I should start trouble shooting?
Was the same for me... upgrading document server to version 0.1.2 fixed it for me. Maybe its useful to restart webserver and deleting your browser cache... and/or deactivate and delete onlyoffice app and reinstall it after you have upgraded document-server app.
You might also have to click the save button in the OO connector app at least once even if not changing anything?
Fixed with current version for me as well. Thx a lot for the fast fix!
For me the Community Document Server upgrade to 0.1.2 fixed it! Awesome, thx a lot!
I fixed my issues by upgrading glibc to 2.14+, what is normally required by the document server, so, please, check.
Unfortunately, upgrading to glibc 2.30 didn't work for me. I actually had to install it since I am running the Linuxserver.io version of Nextcloud which uses Alpine linux's musl libc. I think the installation worked as I got a new error stating
./x2t: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
I installed libstdc++6 which worked successfully, now I am back to the same message ""Community document server is not supported for this instance" However, no new error messages in the log are coming up.
Unfortunately, upgrading to glibc 2.30 didn't work for me. I actually had to install it since I am running the Linuxserver.io version of Nextcloud which uses Alpine linux's musl libc. I think the installation worked as I got a new error stating
./x2t: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
I installed libstdc++6 which worked successfully, now I am back to the same message ""Community document server is not supported for this instance" However, no new error messages in the log are coming up.
I'm also running the Linuxserver Nextcloud container, so perhaps that has something to do with it? Anyway, please do update here if you find a solution.
I just reinstalled both apps, applied the chmod fix @tgurr described and am still getting the ./x2t not found error.
For anyone else running the Linuxserver Nextclouder Docker container, here is the related issue: https://github.com/linuxserver/docker-nextcloud/issues/128
[documentserver_community] Error: OCA\DocumentServer\Document\DocumentConversionException: sh: ./x2t: not found
at <<closure>>
0. /config/www/nextcloud/apps/documentserver_community/lib/Document/ConverterBinary.php line 64
OCA\DocumentServer\Document\ConverterBinary->run("")
1. /config/www/nextcloud/apps/documentserver_community/lib/Controller/StaticController.php line 90
OCA\DocumentServer\Document\ConverterBinary->test()
2. /config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
OCA\DocumentServer\Controller\StaticController->webApps("apps/api/documents/api.js")
3. /config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
OC\AppFramework\Http\Dispatcher->executeController(OCA\DocumentServ ... {}, "webApps")
4. /config/www/nextcloud/lib/private/AppFramework/App.php line 125
OC\AppFramework\Http\Dispatcher->dispatch(OCA\DocumentServ ... {}, "webApps")
5. /config/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
OC\AppFramework\App::main("OCA\\DocumentSe ... r", "webApps", OC\AppFramework\ ... {}, {path: "apps/api ... "})
6. <<closure>>
OC\AppFramework\Routing\RouteActionHandler->__invoke({path: "apps/api ... "})
7. /config/www/nextcloud/lib/private/Route/Router.php line 299
call_user_func(OC\AppFramework\ ... {}, {path: "apps/api ... "})
8. /config/www/nextcloud/lib/base.php line 1008
OC\Route\Router->match("/apps/documents ... s")
9. /config/www/nextcloud/index.php line 38
OC::handleRequest()
GET /apps/documentserver_community/web-apps/apps/api/documents/api.js
from 172.19.0.1 by xthursdayx at 2020-01-21T17:06:57+00:00
Summarising the issue on: linuxserver/docker-nextcloud#128 Looking at the build process for this plugin it is currently extracting large parts of the onlyoffice/documentserver image. The version being extracted seems to only be x86-64 (won’t work on arm,ppc,etc). And the image itself is based on Ubuntu and installs the relevant deb package. This issue will likely be faced with any native binaries in the plugin.
It would probably be best if nextcloud shipped fat versions of native binaries to support multiple platforms and statically linked any dependencies to ensure they are portable across distros.
Linuxserver team member here , you cannot just grab dynamically linked bins and distribute them . They are not portable.
You can however pass static flags at compile time to embed all needed libs and c toolchain to make them portable. Actually programming in a message about the binary not being compatible with the platform it is being run on shows to me that you have a large disconnect between your infra/build people and your front end people.
Please let me know if you have any questions , I am glad to help.
Looking into onlyoffice it seems they only officially target x86-64 (some old success stories of cross compiling to other archs). I’ll try and work out the build system and see how easy it is to create a statically linked binary sometime over the next few days.
Just to add to the discussion - the document server is x86-64 only - interesting enough those binaries get also installed on the ARM platform. Below the output from a rPI4 running latest Nextcloud Docker image with activated the community document server app.
root@48cf63bfbeb2:/var/www/html/custom_apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin# file docbuilder
docbuilder: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=d21e8e3e2bbc9ee69bed5dd4680f972424fecb4f, stripped
root@48cf63bfbeb2:/var/www/html/custom_apps/documentserver_community/3rdparty/onlyoffice/documentserver/server
root@48cf63bfbeb2:/var/www/html/custom_apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin# file x2t
x2t: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=702ce357ba48aa06b820eba41081d1a5a83ff39b, stripped
root@48cf63bfbeb2:/var/www/html/custom_apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin#
This app should be disabled on other architecture ...