From bd24602a42658bfb2647213743aa4497293e7242 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 12 Aug 2016 09:29:40 +0200 Subject: [PATCH] * Filemanager: fix not working changing owner or group of a file/directory (as root!) --- api/src/Vfs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Vfs.php b/api/src/Vfs.php index 36a7ee2be1..8b74d41ea0 100644 --- a/api/src/Vfs.php +++ b/api/src/Vfs.php @@ -2352,7 +2352,7 @@ class Vfs */ static function chown($path,$owner) { - return $path[0] == '/' && chown(self::PREFIX.$path, $owner); + return $path[0] == '/' && chown(self::PREFIX.$path, is_numeric($owner) ? abs($owner) : $owner); } /** @@ -2366,7 +2366,7 @@ class Vfs */ static function chgrp($path,$group) { - return $path[0] == '/' && chgrp(self::PREFIX.$path, $group); + return $path[0] == '/' && chgrp(self::PREFIX.$path, is_numeric($group) ? abs($group) : $group); } /**