Index: uspace/srv/vfs/vfs_ops.c
===================================================================
--- uspace/srv/vfs/vfs_ops.c	(revision 386e2768184dc474f850284106424c3acd8d13c4)
+++ uspace/srv/vfs/vfs_ops.c	(revision 14040e53f16bbe12f89d0e7bb08c134a731e92f2)
@@ -953,6 +953,14 @@
 	oldc[olen] = '\0';
 	newc[nlen] = '\0';
-	if (!str_lcmp(newc, oldc, str_length(oldc))) {
-		/* oldc is a prefix of newc */
+	if ((!str_lcmp(newc, oldc, str_length(oldc))) &&
+	    ((newc[str_length(oldc)] == '/') ||
+	    (str_length(oldc) == 1) ||
+	    (str_length(oldc) == str_length(newc)))) {
+	    	/*
+		 * oldc is a prefix of newc and either
+		 * - newc continues with a / where oldc ends, or
+		 * - oldc was / itself, or
+		 * - oldc and newc are equal.
+		 */
 		ipc_answer_0(rid, EINVAL);
 		free(old);
