diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index f0b16a5788680d60a1371ab9a1c79a69b760804a..24cccb3a5c8f34b04aef2def4510d0410776528d 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -174,6 +174,11 @@
 		 */
 		_clientSideSort: true,
 
+		/**
+		 * Whether or not users can change the sort attribute or direction
+		 */
+		_allowSorting: true,
+
 		/**
 		 * Current directory
 		 * @type String
@@ -718,7 +723,7 @@
 				$target = $target.closest('a');
 			}
 			sort = $target.attr('data-sort');
-			if (sort) {
+			if (sort && this._allowSorting) {
 				if (this._sort === sort) {
 					this.setSort(sort, (this._sortDirection === 'desc')?'asc':'desc', true, true);
 				}
diff --git a/apps/files/js/recentfilelist.js b/apps/files/js/recentfilelist.js
index e63a71f8549fa65116fa36cbbcf4c4d8c1c6fac3..e8c61cbfe2df740a4d62e7501e7e6e77000f408f 100644
--- a/apps/files/js/recentfilelist.js
+++ b/apps/files/js/recentfilelist.js
@@ -28,6 +28,7 @@ $(document).ready(function () {
 				direction: 'desc'
 			};
 			this.initialize($el, options);
+			this._allowSorting = false;
 		};
 		RecentFileList.prototype = _.extend({}, OCA.Files.FileList.prototype,
 			/** @lends OCA.Files.RecentFileList.prototype */ {