Index: sandbox/filemanager/inc/class.uiconfig.inc.php
===================================================================
--- sandbox/filemanager/inc/class.uiconfig.inc.php	(revision 1905)
+++ sandbox/filemanager/inc/class.uiconfig.inc.php	(revision 1909)
@@ -19,4 +19,5 @@
 			'reconstructFolder' => True,
 			'set_owner' => True,
+			'set_permission' => True,
 			'renameFolder' => True,
 			'createFolder' => True,
@@ -81,5 +82,6 @@
 			$vars[lang_search]=lang('search');
 			$vars[lang_directory]=lang('directory');
-			$vars[lang_config]=lang('config');
+			$vars[lang_setowner]=lang('set owner');
+			$vars[lang_setperm]=lang('set permission');
 
 			$t->set_var($vars);
@@ -288,4 +290,46 @@
 				 echo "<option value='".$val['account_id']."'>".$val['account_lid']."</option>";
 		 }
+		 function set_permission(){
+			 $GLOBALS['phpgw_info']['flags'] = array
+				 (
+					 'currentapp'    => 'filemanager',
+					 'noheader'      => True,
+					 'nonavbar' => True,
+					 'nofooter'      => True,
+					 'noappheader'   => True,
+					 'enable_browser_class'  => True
+				 );
+			 $name = $GLOBALS['phpgw']->db->db_addslashes(base64_decode($_GET['dir']));
+			 $perms = ($_GET['perms'])*1;
+			 $owner = ($_GET['owner'])*1;
+			 $dirs=explode('/',$name);
+			 $GLOBALS['phpgw']->db->query('SELECT owner_id  from phpgw_vfs  WHERE directory = \'/'.$dirs[1].'\' and name=\''.$dirs[2].'\' LIMIT 1',__LINE__,__FILE__);
+			 if ($GLOBALS['phpgw']->db->next_record()){
+				 $val = $GLOBALS['phpgw']->db->row();
+				 $owner_id = $val['owner_id'];
+			 }
+
+			 $query = "SELECT count(*) FROM phpgw_acl WHERE acl_appname = 'filemanager' and acl_account = '".$owner_id."' and acl_location='".$owner."'";
+			 if ($GLOBALS['phpgw']->db->query($query) && $GLOBALS['phpgw']->db->next_record())
+				 $val = $GLOBALS['phpgw']->db->row();
+			 else
+			 {
+				 echo $GLOBALS['phpgw']->db->error;
+				 return false;
+			 }
+			 if ($val['count'] == '1')
+				$GLOBALS['phpgw']->db->query("UPDATE phpgw_acl SET acl_rights = ".$perms." where acl_appname = 'filemanager' and acl_account = '".$owner_id."' AND acl_location = '".$owner."'",__LINE__,__FILE__);
+			 else
+				 $GLOBALS['phpgw']->db->query("INSERT INTO phpgw_acl values('filemanager','".$owner."','".$owner_id."',".$perms.")",__LINE__,__FILE__);
+			 if ($GLOBALS['phpgw']->db->Error)
+				 echo "Erro";
+			 else
+			 {
+				echo lang('entry updated sucessfully');
+			 }
+			 return;
+		 }
+	
+
 		 function set_owner(){
 			 $GLOBALS['phpgw_info']['flags'] = array
Index: sandbox/filemanager/inc/hook_admin.inc.php
===================================================================
--- sandbox/filemanager/inc/hook_admin.inc.php	(revision 1905)
+++ sandbox/filemanager/inc/hook_admin.inc.php	(revision 1909)
@@ -28,5 +28,5 @@
 		'Folders management' => $GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiconfig.folders'),
 		'Quota management' => $GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiconfig.quota'),
-		'Groups and users' => $GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiconfig.groups_users')
+		'Permissions of groups and users' => $GLOBALS['phpgw']->link('/index.php','menuaction='.$appname.'.uiconfig.groups_users')
 
 	);
Index: sandbox/filemanager/js/config.js
===================================================================
--- sandbox/filemanager/js/config.js	(revision 1905)
+++ sandbox/filemanager/js/config.js	(revision 1909)
@@ -6,8 +6,24 @@
 	cExecute('/index.php?menuaction=filemanager.uiconfig.load_quota&name='+base64_encode(el.value),loadq_handler);
 }
+
 function set_owner(){
 	var dirName = document.getElementById('search1').value;
 	var ownerName = document.getElementById('search2').value;
 	cExecute('/index.php?menuaction=filemanager.uiconfig.set_owner&dir='+base64_encode(dirName)+'&owner='+ownerName,alert);
+}
+
+function set_permission(){
+	var dirName = document.getElementById('search1').value;
+	var ownerName = document.getElementById('search2').value;
+	var perms=new Array("egw_private","egw_delete","egw_edit","egw_add","egw_read");
+	permission = 0;
+	for (val in perms)
+	{
+		permission = permission*2;
+		if(document.getElementById(perms[val]).checked)
+			permission += 1;
+	}
+
+	cExecute('/index.php?menuaction=filemanager.uiconfig.set_permission&dir='+base64_encode(dirName)+'&perms='+permission+'&owner='+ownerName,alert);
 }
 function save_quota(){
Index: sandbox/filemanager/templates/default/config_owner.tpl
===================================================================
--- sandbox/filemanager/templates/default/config_owner.tpl	(revision 1905)
+++ sandbox/filemanager/templates/default/config_owner.tpl	(revision 1909)
@@ -19,8 +19,14 @@
 		</tr>
 		<tr>
+				<td>&nbsp;</td>
+				<td>&nbsp;</td>
+				<td>&nbsp;</td>
+		</tr>
+		<tr>
 			<td>
 				<b>{lang_search}</b></td>
 			<td>
-				<input onkeyup="search_user(this)" size="30" type="text" value="" /></td>
+				<input onkeyup="search_user(this)" size="30" type="text" value="" />
+			</td>
 			<td>
 				&nbsp;</td>
@@ -29,13 +35,39 @@
 			<td>
 				<b>{lang_users_and_groups}</b></td>
-			<td>
+			<td valign="top">
 				<select id="search2" size="5" style="width: 200px;"></select> </td>
 			<td>
-				&nbsp;</td>
+			<table border="0">
+				<tbody><tr>
+					<td><input name="checkAttr" id="egw_read" type="checkbox"></td>
+					<td>Read</td>
+				</tr>
+				<tr>
+
+					<td><input name="checkAttr" id="egw_add" type="checkbox"></td>
+					<td>Add</td>
+				</tr>
+				<tr>
+					<td><input name="checkAttr" id="egw_edit" type="checkbox"></td>
+					<td>Edit</td>
+				</tr>
+				<tr>
+					<td><input name="checkAttr" id="egw_delete" type="checkbox"></td>
+
+					<td>Delete</td>
+				</tr>
+				<tr>
+					<td><input name="checkAttr" id="egw_private" type="checkbox"></td>
+					<td>Private</td>
+				</tr>
+			</tbody></table>
+			</td>
 		</tr>
 		<tr>
 			<td>
+			</td>
 			<td>
-				<input onclick="set_owner()" type="button" value="{lang_config}" />
+				<input onclick="set_owner()" type="button" value="{lang_setowner}" />
+				<input onclick="set_permission()" type="button" value="{lang_setperm}" />
 			</td>
 			<td>
