https://bugs.koozali.org/show_bug.cgi?id=12411
Bug ID: 12411
Summary: nextcloud is_dir(): open_basedir restriction in
effect. File(/opt/bin) is not within the allowed
path(s)
Classification: Contribs
Product: SME Contribs
Version: 10.0
Hardware: ---
OS: ---
Status: CONFIRMED
Severity: normal
Priority: P3
Component: smeserver-nextcloud
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Target Milestone: ---
Just hit this in NC26.
nextcloud is_dir(): open_basedir restriction in effect. File(/opt/bin) is not
within the allowed path(s):
Looks like upstream but no fix til possibly NC 28.
https://help.nextcloud.com/t/open-basedir-restriction-after-update-to-26/158850/35
https://github.com/nextcloud/server/pull/37959/files
Quick patch seems to fix it - but will be overwritten on update.
diff -ruN /usr/share/nextcloud/lib/private/Preview/Generator.php.old
/usr/share/nextcloud/lib/private/Preview/Generator.php
--- /usr/share/nextcloud/lib/private/Preview/Generator.php.old 2023-09-15
14:57:04.891660329 +0200
+++ /usr/share/nextcloud/lib/private/Preview/Generator.php 2023-09-15
15:05:51.560389646 +0200
@@ -348,8 +348,13 @@
public static function getHardwareConcurrency(): int {
static $width;
if (!isset($width)) {
- if (is_file("/proc/cpuinfo")) {
- $width =
substr_count(file_get_contents("/proc/cpuinfo"), "processor");
+ if (function_exists('ini_get')) {
+ $openBasedir = ini_get('open_basedir');
+ if (empty($openBasedir) || strpos($openBasedir,
'/proc/cpuinfo') !== false) {
+ $width = is_readable('/proc/cpuinfo') ?
substr_count(file_get_contents('/proc/cpuinfo'), 'processor') : 0;
+ } else {
+ $width = 0;
+ }
} else {
$width = 0;
}
--
You are receiving this mail because:
You are the QA Contact for the bug._______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/