I have moved my Nextcloud and recently I can no longer open Office documents. I get the following error message:
is_file(): open_basedir restriction in effect. File(/proc/cpuinfo) is not within the allowed path(s): (/var/www/vhosts/mydomain.com/:/tmp/:/dev/urandom) at /var/www/vhosts/mydomain.com/cloud.mydomain.com/lib/private/Preview/Generator.php#303
I found similar error messages in the forum search, but that didn’t help me. How can I fix this?
OS Ubuntu 20.04.6 LTS
PHP Version 8.2.10
MySQL Version 10.5.22
Nextcloud Version 27.0.2
That error message is because you’re in an environment that restricts things. It’s preventing the fancier preview generation from working. That feature will likely get a further overhaul soon to workaround environments with that restriction. There is an open issue about it if you want search GitHub and subscribe to track it’s progress or give it a thumbs vote to help prioritize it. You can also fix it yourself if you have the ability to add entries to your server’s PHP
open_basedir restrictions by adding
/proc/cpuinfo to the list of permitted paths.
That said, that’s not why you can’t open Office documents. Were you previously using the Office + CODE app in NC? If so you’ll need to install those apps.
Thank you very much, that solved the problem.
I thought the message was related to the Office documents. I didn’t change anything, but shortly afterwards it worked again.