I am using the following code to copy a folder and it’s contents from location A to B.
It’s works file but I have a problem with the file ownerships…it’s setting the copy to Nobody
I’ve tried activating suPHP but my website broke so can’t do that one.
Are there any work arounds?
Here is the code I’m using:
rcopy("$source_folder", "$target_folder");
chmod($target_folder, 0755);
chmod($target_folder.'/images', 0777);
}
Activating suPHP or implementing a workaround will be your only options.
Your site may have broken when suPHP was activated because some of your directory permissions were not set correctly. Make sure none of your directories or files are world or group writable. Set directories to 744, and files to 644 generally.
Check your error log for more details as to why suPHP was preventing your site from running.