You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document server fails with "./x2t: Permission denied" #10
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.
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"
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?
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"
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.
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.
If anyone read this above with reference to CentOS and is serious about using SELinux properly, DO NOT do this, as it essentially tells SELinux to stop enforcing anything for httpd effectively giving it all permissions for any resources assigned to the Apache user. Do a little more work and figure out what specific contexts / boolean permissions you need and enable them, and only them. If you're using php_fpm, you can further isolate your permissions using sub-contexts, and different apache child users.
As stated above, don't disable selniux to enforce it's policy's. I just had the same problem and solved it by adding a policy to selinux. The sever needs to execute the binary, so instead add the following (might have to change the path to your installation folder) for CentOS;
semanage fcontext -a -t httpd_sys_script_exec_t '/var/www/html/nextcloud/apps/documentserver_community/3rdparty/onlyoffice/documentserver(/.*)?'
restorecon -R -v /var/www/html/nextcloud
Old thread but to anyone still experiencing this issue, ensure that you use -R when applying chown (chown -R www-data:www-data documentserver_community/) if you installed the Community Document Server app manually. I had this exact issue and realized that I had only been changing ownership of the main directory, not the sub-directories. Hope this helps someone
For whoever might be concerned about the more recent problems with x2t and onlyoffice, eg OCA\DocumentServer\Document\DocumentConversionException: ./x2t: error while loading shared libraries: libgraphics.so: cannot open shared object file: No such file or directory
Check if your problem is SELinux related, eg disable selinux with setenforce 0 and try again.
If so, re-enable selinux with setenforce 1 and proceed to create the following Selinux policy:
Create file /root/my-onlyoffice.te containing
module my-onlyoffice 1.0;
require {
type httpd_sys_script_exec_t;
type httpd_t;
type ld_so_t;
type configfs_t;
class file { execute_no_trans setattr };
class dir { getattr };
}
#============= httpd_sys_script_exec_t ==============
allow httpd_t httpd_sys_script_exec_t:file setattr;
allow httpd_t ld_so_t:file execute_no_trans;
allow httpd_t configfs_t:dir getattr;
Now proceed to create a module from that file with command
I was running OnlyOffice fine since it was included in Nextcloud 19. I needed to adjust the SELinux permissions as described here to get it work.
Now for a couple of days I figured out that I got back the x2t permission denied error. The solution from @deajan fixed the error.
Furthermore I needed to issue chmod u+x docbuilder since this one lost its permissions.
After all that, I can run OnlyOffice inside Nextcloud but with the mobile app I got still x2t permission denied error.
Everything works fine with disabled SELinux.
I upgraded also to Nextcloud 20.0.2 today, but permission error using mobile app still continues.
No log in SELinux about blocking but in Nextcloud.
Even after applying @deajan 's SELinux module and contexts I still cannot get OnlyOffice to run. Checking the SELinux audits with ausearch -c 'x2t' I get several results like the following: type=ANOM_ABEND msg=audit(1615135507.682:588047): audit=982 uid=982 gid=975 ses=82515 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=18453 comm="x2t" reason="memory violation" sig=4
Creating a custom SELinux module with audit2allow is not possible for this "memory violation". Any ideas?
I applied @deajan SELinux module and I get now:
"SELinux prevents php-fpm from accessing sock_file clamd.sock with write access."
type=AVC msg=audit(1615235215.940:543): avc: denied { write } for pid=1097 comm="php-fpm" name="clamd.sock" dev="tmpfs" ino=1812 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:antivirus_var_run_t:s0 tclass=sock_file permissive=0
I do not understand why php-fpm should get write access to clamd.sock file?
The SELinux policy allow antivirus to can scan system is activated:
boolean -m -1 antivirus_can_scan_system
On our server (managed by the provider) the same issue comes up (since yesterday). Error messages:
"Community document server is not supported for this instance, please setup and configure an external document server✖" and:
"can't execute x2t binary, ensure php can execute binaries in the app folder✖"
Running Nextcloud 21.0.1
Reinstalling both Apps didn't resolve the issue.
Since I have no admin access to the server itself i can't provide much more information. The provider claims it gives no support for the App but tells me, that other customers experience the same issue.
Bottonline: Issue is still unresolved and comes up under Nexcloud 21 as well.
Yeah I just got this error as well. I've read about the "chmod u+x docbuilder" solution, but I don't have a file path which corresponds to the where I'm supposed to run that command.
Under "<nextcloud_root_folder>/apps/documentserver_community/3rdparty/onlyoffice/documentserver/", I only have a folder called "web-apps".
This should be looked into more, since this was a fresh install. I installed nextcloud manually (not docker), but I installed OnlyOffice and Community Document Server through Nexctloud's App menu. So if I'm missing any dependencies then at least I should have been informed of such in the documentation or after setup. But of course the best thing would be if the app itself was plug and play.
Activity
florian-obradovic commentedon Jan 17, 2020
Same here, updated from 17>18

tgurr commentedon Jan 18, 2020
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 deniedWhich was fixed by:
poVoq commentedon Jan 18, 2020
Same with the official 18.0.0RC2-apache Docker image.
I also just now upgraded from 17 to 18.
HackintoshHD commentedon Jan 18, 2020
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.Chownio commentedon Jan 18, 2020
@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.
florian-obradovic commentedon Jan 18, 2020
cd /var/www/nextcloud/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/ chmod u+x docbuilder x2tfixes 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"
xorbital commentedon Jan 18, 2020
I fixed it by:
emasty commentedon Jan 18, 2020
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...
molle100 commentedon Jan 18, 2020
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?
autoize commentedon Jan 18, 2020
Marcwa19197 commentedon Jan 18, 2020
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.
OnyxSky commentedon Jan 18, 2020
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
NiTRoeSE commentedon Jan 18, 2020
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
edwardscaleb9 commentedon Jan 19, 2020
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.
42 remaining items
gfiasco commentedon Mar 16, 2020
I have tried everything in here but nothing seem to work around this
I'm using nextcloud:stable with mysql as db.
even fresh installation suffers of this
oucil commentedon Jul 28, 2020
If anyone read this above with reference to CentOS and is serious about using SELinux properly, DO NOT do this, as it essentially tells SELinux to stop enforcing anything for httpd effectively giving it all permissions for any resources assigned to the Apache user. Do a little more work and figure out what specific contexts / boolean permissions you need and enable them, and only them. If you're using
php_fpm, you can further isolate your permissions using sub-contexts, and different apache child users.zynexiz commentedon Aug 7, 2020
As stated above, don't disable selniux to enforce it's policy's. I just had the same problem and solved it by adding a policy to selinux. The sever needs to execute the binary, so instead add the following (might have to change the path to your installation folder) for CentOS;
yardbro commentedon Oct 14, 2020
Old thread but to anyone still experiencing this issue, ensure that you use -R when applying chown (chown -R www-data:www-data documentserver_community/) if you installed the Community Document Server app manually. I had this exact issue and realized that I had only been changing ownership of the main directory, not the sub-directories. Hope this helps someone
deajan commentedon Oct 14, 2020
For whoever might be concerned about the more recent problems with x2t and onlyoffice, eg
OCA\DocumentServer\Document\DocumentConversionException: ./x2t: error while loading shared libraries: libgraphics.so: cannot open shared object file: No such file or directoryCheck if your problem is SELinux related, eg disable selinux with
setenforce 0and try again.If so, re-enable selinux with
setenforce 1and proceed to create the following Selinux policy:Create file
/root/my-onlyoffice.tecontainingNow proceed to create a module from that file with command
Now create a selinux loadable policy
Load the policy with
cd /root && semodule -i my-onlyoffice.ppNow it's time to label your nextcloud + onlyoffice setup (of course, adapt paths to your virtualhost)
Should work ;)
Wotisrv commentedon Nov 20, 2020
I was running OnlyOffice fine since it was included in Nextcloud 19. I needed to adjust the SELinux permissions as described here to get it work.
Now for a couple of days I figured out that I got back the x2t permission denied error. The solution from @deajan fixed the error.
Furthermore I needed to issue
chmod u+x docbuildersince this one lost its permissions.After all that, I can run OnlyOffice inside Nextcloud but with the mobile app I got still x2t permission denied error.
Everything works fine with disabled SELinux.
I upgraded also to Nextcloud 20.0.2 today, but permission error using mobile app still continues.
No log in SELinux about blocking but in Nextcloud.
System Fedora-Server 32 Edition, Nextcloud 20.0.2
AndreasDekiert commentedon Mar 7, 2021
Even after applying @deajan 's SELinux module and contexts I still cannot get OnlyOffice to run. Checking the SELinux audits with
ausearch -c 'x2t'I get several results like the following:type=ANOM_ABEND msg=audit(1615135507.682:588047): audit=982 uid=982 gid=975 ses=82515 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=18453 comm="x2t" reason="memory violation" sig=4Creating a custom SELinux module with
audit2allowis not possible for this "memory violation". Any ideas?System CentOS 7, Nextcloud 20.0.8
Wotisrv commentedon Mar 8, 2021
I applied @deajan SELinux module and I get now:
"SELinux prevents php-fpm from accessing sock_file clamd.sock with write access."
type=AVC msg=audit(1615235215.940:543): avc: denied { write } for pid=1097 comm="php-fpm" name="clamd.sock" dev="tmpfs" ino=1812 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:antivirus_var_run_t:s0 tclass=sock_file permissive=0
I do not understand why php-fpm should get write access to clamd.sock file?
The SELinux policy allow antivirus to can scan system is activated:
boolean -m -1 antivirus_can_scan_system
System Fedora 33 Server-Edition, Nextcloud 20.0.8
deajan commentedon Mar 13, 2021
@Wotisrv Looks like you have the antivirus plugin in Nextcloud where nextcloud itself triggers an AV scan. Can you confirm ?
Wotisrv commentedon Mar 13, 2021
@deajan yes that's right.
j3qb commentedon May 10, 2021
On our server (managed by the provider) the same issue comes up (since yesterday). Error messages:
"Community document server is not supported for this instance, please setup and configure an external document server✖" and:
"can't execute x2t binary, ensure php can execute binaries in the app folder✖"
Running Nextcloud 21.0.1
Reinstalling both Apps didn't resolve the issue.
Since I have no admin access to the server itself i can't provide much more information. The provider claims it gives no support for the App but tells me, that other customers experience the same issue.
Bottonline: Issue is still unresolved and comes up under Nexcloud 21 as well.
sich97 commentedon Sep 28, 2021
Yeah I just got this error as well. I've read about the "chmod u+x docbuilder" solution, but I don't have a file path which corresponds to the where I'm supposed to run that command.
Under "<nextcloud_root_folder>/apps/documentserver_community/3rdparty/onlyoffice/documentserver/", I only have a folder called "web-apps".
This should be looked into more, since this was a fresh install. I installed nextcloud manually (not docker), but I installed OnlyOffice and Community Document Server through Nexctloud's App menu. So if I'm missing any dependencies then at least I should have been informed of such in the documentation or after setup. But of course the best thing would be if the app itself was plug and play.
sitoagency commentedon Apr 6, 2022
Same issue here