Updated the 404 handling of the file and page permits