I have the problem that when I try to copy some files from php I get the response that it failed, but the file is actually copied. This is a problem since I log an error message and exit the script when it fails but there are still plenty left for the script to do.
I've tried two different ways of copy:
if(!copy("/var/www/html/smicadmin.properties", "/etc/conf/".$new_dir."/smicadmin.properties")) if(shell_exec("cp $src $dest")==null)
I have labeled 'conf' in order for SELinux to allow apache to write to it:
chcon -R -t httpd_sys_script_rw_t /etc/conf
Does anyone have any clue why this can happen and how to fix it?