* Filemanager: fix not working changing owner or group of a file/directory (as root!)

This commit is contained in:
Ralf Becker 2016-08-12 09:29:40 +02:00
parent ac45503630
commit bd24602a42

View File

@ -2352,7 +2352,7 @@ class Vfs
*/ */
static function chown($path,$owner) 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) 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);
} }
/** /**