diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 8ec025ebc26d36ff48ed9ee3ff3c74700763a29d..ca668e24e7f2c04db2c6e8540bba797ed7783ebc 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -289,7 +289,8 @@ class Manager implements IManager {
 
 		// Check if we actually have share permissions
 		if (!$share->getNode()->isShareable()) {
-			$message_t = $this->l->t('You are not allowed to share %s', [$share->getNode()->getPath()]);
+			$path = $userFolder->getRelativePath($share->getNode()->getPath());
+			$message_t = $this->l->t('You are not allowed to share %s', [$path]);
 			throw new GenericShareException($message_t, $message_t, 404);
 		}
 
@@ -333,7 +334,8 @@ class Manager implements IManager {
 
 		// Check that we do not share with more permissions than we have
 		if ($share->getPermissions() & ~$permissions) {
-			$message_t = $this->l->t('Can’t increase permissions of %s', [$share->getNode()->getPath()]);
+			$path = $userFolder->getRelativePath($share->getNode()->getPath());
+			$message_t = $this->l->t('Can’t increase permissions of %s', [$path]);
 			throw new GenericShareException($message_t, $message_t, 404);
 		}
 
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php
index 02f779abf51ed7ec74dd7eb9366326a0066c8bd9..314038fe13b2c6ea5e71301a378e96e428777116 100644
--- a/tests/lib/Share20/ManagerTest.php
+++ b/tests/lib/Share20/ManagerTest.php
@@ -708,6 +708,9 @@ class ManagerTest extends \Test\TestCase {
 
 		$userFolder = $this->createMock(Folder::class);
 		$userFolder->method('getPath')->willReturn('myrootfolder');
+		$userFolder->expects($this->any())
+			->method('getRelativePath')
+			->willReturnArgument(0);
 		$this->rootFolder->method('getUserFolder')->willReturn($userFolder);