diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 2b283375a67734e15bde3e4c811b83e486d9a1f3..59598e35fa241b8a923d77b49c4d44e6f6e1376e 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -1,5 +1,4 @@
 <?php
-$RUNTIME_NOSETUPFS = true;
 // Load other apps for file previews
 OC_App::loadApps();
 
@@ -46,6 +45,7 @@ if (isset($_GET['t'])) {
 			$fileOwner = $shareOwner;
 		}
 		if (isset($fileOwner)) {
+			OC_Util::tearDownFS();
 			OC_Util::setupFS($fileOwner);
 			$path = \OC\Files\Filesystem::getPath($linkItem['file_source']);
 		}
diff --git a/cron.php b/cron.php
index 7c875843c7545adc8e1463a111a74ad94c560929..69bfed8d05672e2df1a0236a9bc212c2610b5dc1 100644
--- a/cron.php
+++ b/cron.php
@@ -45,7 +45,6 @@ function handleUnexpectedShutdown() {
 	}
 }
 
-$RUNTIME_NOSETUPFS = true;
 require_once 'lib/base.php';
 
 session_write_close();