diff --git a/lib/files.php b/lib/files.php
index 885f6977fbd15715dd36829401641654b3948ef1..705b7a6ca66fefa2ad212ce8ed95faab8e5bb170 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -373,10 +373,12 @@ class OC_Files {
 			}
 		}
 
-		//supress errors in case we don't have permissions for it
-		if(@file_put_contents(OC::$SERVERROOT.'/.htaccess', $htaccess)) {
-			return OC_Helper::computerFileSize($size);
-		}
+		//check for write permissions
+		if(is_writable(OC::$SERVERROOT.'/.htaccess')) {
+			file_put_contents(OC::$SERVERROOT.'/.htaccess', $htaccess);
+			return OC_Helper::computerFileSize($size);	
+		} else { OC_Log::write('files','Can\'t write upload limit to '.OC::$SERVERROOT.'/.htaccess. Please check the file permissions',OC_Log::WARN); }
+		
 		return false;
 	}