diff --git a/gosa-core/include/class_CopyPasteHandler.inc b/gosa-core/include/class_CopyPasteHandler.inc
index 60bf1270ed02194ccf5005d5c3c66e978d016e2c..a7fdee4589b49899b9d8cb8fc268caf8d0c430bd 100644 (file)
if(!is_dir(LDAP_DUMP_PATH)){
@mkdir(LDAP_DUMP_PATH);
}
+
+ /* 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)){
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){