diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index 156b49d4e82886f946fe87a85a857dff404e5dc2..edc570c967d31b175d089684e9c5c823a05c9320 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -72,6 +72,7 @@ abstract class Common implements Storage, ILockingStorage {
 	protected $updater;
 
 	protected $mountOptions = [];
+	protected $owner = null;
 
 	public function __construct($parameters) {
 	}
@@ -383,13 +384,11 @@ abstract class Common implements Storage, ILockingStorage {
 	 * @return string|false uid or false
 	 */
 	public function getOwner($path) {
-		static $owner;
-
-		if (!isset($owner)) {
-			$owner = \OC_User::getUser();;
+		if ($this->owner === null) {
+			$this->owner = \OC_User::getUser();
 		}
 
-		return $owner;
+		return $this->owner;
 	}
 
 	/**