diff --git a/files/download.php b/files/download.php
index f890036a32e5c58160b36faa908cf851c4da7db7..63209eaccbb2ae9fc4f1db2bb025f391ecf6fa9b 100644
--- a/files/download.php
+++ b/files/download.php
@@ -33,6 +33,14 @@ if( !OC_USER::isLoggedIn()){
 
 $filename = $_GET["file"];
 
+if(!OC_FILESYSTEM::file_exists($filename)){
+	header("HTTP/1.0 404 Not Found");
+	$tmpl = new OC_TEMPLATE( '', '404', 'guest' );
+	$tmpl->assign('file',$filename);
+	$tmpl->printPage();
+	exit;
+}
+
 $ftype=OC_FILESYSTEM::getMimeType( $filename );
 
 header('Content-Type:'.$ftype);
diff --git a/img/weather-clear.png b/img/weather-clear.png
new file mode 100644
index 0000000000000000000000000000000000000000..0acf7a9b2afd4ba9b8492f51d5204721f9e4559a
Binary files /dev/null and b/img/weather-clear.png differ
diff --git a/lib/files.php b/lib/files.php
index 642a7e7204950dc7050abadc42bc354d1efbd097..58bb04ec34689acb8654485e5498bb14686581ff 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -146,7 +146,10 @@ class OC_FILES {
 			}
 		}elseif($zip or !OC_FILESYSTEM::file_exists($filename)){
 			header("HTTP/1.0 404 Not Found");
-			die('404 Not Found');
+			$tmpl = new OC_TEMPLATE( '', '404', 'guest' );
+			$tmpl->assign('file',$filename);
+			$tmpl->printPage();
+// 			die('404 Not Found');
 		}else{
 			header("HTTP/1.0 403 Forbidden");
 			die('403 Forbidden');
diff --git a/plugins/publiclink/get.php b/plugins/publiclink/get.php
index cdfe42ef262150d02b29c8f84d31a2cdb9d2eea4..fb8a13b5417474e1ec0c1518b26af4dc24885f08 100644
--- a/plugins/publiclink/get.php
+++ b/plugins/publiclink/get.php
@@ -70,7 +70,8 @@ if($path!==false){
 	}
 }else{
 	header("HTTP/1.0 404 Not Found");
-	echo '404 Not Found';
+	$tmpl = new OC_TEMPLATE( '', '404', 'guest' );
+	$tmpl->printPage();
 	die();
 }
 ?>
\ No newline at end of file
diff --git a/templates/404.php b/templates/404.php
new file mode 100644
index 0000000000000000000000000000000000000000..7696d16f8e24ce30c4e51e91585ee3395f9d5125
--- /dev/null
+++ b/templates/404.php
@@ -0,0 +1,9 @@
+<div id="login">
+	<img src="<?php echo image_path("", "weather-clear.png"); ?>" alt="ownCloud" />
+	<ul>
+		<li class='error'>
+			Error 404, Cloud not found<br/>
+			<p class='hint'><?php if(isset($_['file'])) echo $_['file']?></p>
+		</li>
+	</ul>
+</div>
\ No newline at end of file