diff --git a/css/default.php b/css/default.php
index 4d15ef6d6d4d7da4b32722a745b08c0cee698671..7d65820c42ba7a6497959f9ecc6e42e87b832643 100755
--- a/css/default.php
+++ b/css/default.php
@@ -92,6 +92,11 @@ a#owncloud-logo span {
   display:none;
 }
 
+td.nametext{
+	position:relative;
+	display:block;
+}
+
 .nametext a, .breadcrumb a{color:#333333; font-size:8pt; font-weight:bold; text-decoration:none;}
 .errortext {color:#CC3333; font-size:9pt; font-weight:bold; text-decoration:none;}
 .highlighttext {color:#333333; font-size:9pt; font-weight:bold; text-decoration:none;}
@@ -223,6 +228,7 @@ div.breadcrumb{
 div.fileactionlist{
 	z-index:50;
     position:absolute;
+    top:20px;
     background-color: #DDDDDD;
     margin-top:5px;
     border:1px black solid;
diff --git a/css/small.php b/css/small.php
index 3c91614f260af9e5f1242118332c1c957753249d..60f79f51be18dc89351406cb4ae1035874f57a04 100644
--- a/css/small.php
+++ b/css/small.php
@@ -96,6 +96,8 @@ a#owncloud-logo span {
 
 td.nametext{
 	white-space:nowrap;
+	display:block;
+	position:relative;
 	/*overflow:hidden;*/
 	text-overflow: ellipsis;
 }
@@ -239,7 +241,7 @@ div.breadcrumb{
 }
 
 div.fileactionlist{
-	z-index:50;
+	z-index:100;
     position:absolute;
     background-color: #DDDDDD;
     margin-top:5px;
diff --git a/inc/lib_base.php b/inc/lib_base.php
index 536024697d7c3a5d0aeeb3bfb5b34291966e1923..6eef3affd4074264595c9f0cd84bcc953216d925 100755
--- a/inc/lib_base.php
+++ b/inc/lib_base.php
@@ -172,7 +172,7 @@ class OC_UTIL {
 		}
 	}
 	$prems=substr(decoct(fileperms($CONFIG_DATADIRECTORY_ROOT)),-3);
-	if(substr($CONFIG_DATADIRECTORY_ROOT,2,1)!='0'){
+	if(substr($prems,-1)!='0'){
 		chmodr($CONFIG_DATADIRECTORY_ROOT,0770);
 		clearstatcache();
 		$prems=substr(decoct(fileperms($CONFIG_DATADIRECTORY_ROOT)),-3);
@@ -182,7 +182,7 @@ class OC_UTIL {
 	}
 	if($CONFIG_ENABLEBACKUP){
 		$prems=substr(decoct(fileperms($CONFIG_BACKUPDIRECTORY)),-3);
-		if(substr($CONFIG_BACKUPDIRECTORY,2,1)!='0'){
+		if(substr($prems,-1)!='0'){
 			chmodr($CONFIG_BACKUPDIRECTORY,0770);
 			clearstatcache();
 			$prems=substr(decoct(fileperms($CONFIG_BACKUPDIRECTORY)),-3);