I didn't found on Google how to solve this issue, maybe someone may help me.
I have a dedicated server where i host a few sites. On all of them i face this problem.
When i copy image files from one folder to another or when i resize images via PHP script, the new images has owner nobody (99 99) and i cannot overwrite them when i run again the script.
When i upload images via FTP the owner for images is correct.
Owner/Group 526 522
After i resize or copy images in another folder via PHP script i have this owner:
Owner/Group 99 99
I have read the problem is that PHP and FTP are not in the same group.
What i need to do to have Owner/Group 526 522 after image resize or copy?