diff --git a/gosa-core/include/class_CopyPasteHandler.inc b/gosa-core/include/class_CopyPasteHandler.inc
index 1c0ff80460452d389ae298b341860677b4b53ea0..a7fdee4589b49899b9d8cb8fc268caf8d0c430bd 100644 (file)
/* Create patch if it doesn't exists */
if(!is_dir(LDAP_DUMP_PATH)){
@mkdir(LDAP_DUMP_PATH);
- @chmod(LDAP_DUMP_PATH,0700);
}
+
+ /* Update folder permissions */
+ if(!@chmod(LDAP_DUMP_PATH,0700)){
+ $msg= sprintf(_("Cannot cleanup copy & paste queue: setting permissions for '%s' failed!"),LDAP_DUMP_PATH);
+ msg_dialog::display(_("Configuration error"), $msg, ERROR_DIALOG);
+ new log("copy","all/all","copy & paste, event queue.",array(), $msg);
+ return(FALSE);
+ }
/* check if we are able to create a new file the given directory */
if(!is_writeable(LDAP_DUMP_PATH)){
/* Create patch if it doesn't exists */
if(!is_dir($path)){
@mkdir($path);
- @chmod($path,0700);
}
/* check if we are able to create a new file the given directory */
return(FALSE);
}
+ /* Update folder permissions */
+ if(!@chmod(LDAP_DUMP_PATH,0700)){
+ $msg= sprintf(_("Cannot save LDAP dump: setting permissions for '%s' failed!"),LDAP_DUMP_PATH);
+ msg_dialog::display(_("Configuration error"), $msg, ERROR_DIALOG);
+ new log("copy","all/all","copy & paste, event queue.",array(), $msg);
+ return(FALSE);
+ }
+
/* Create file handle */
$fp = @fopen($path."/".$filename,"w+");
if(!$fp){