I have set up a simple PHP uploader script that moves uploaded files via move_uploaded_file(). The process script does a number of checks on the uploaded files, creates a new directory (mkdir()) and then moves the file from the /tmp folder to the final destination (the new directory). The problem is my inability to delete or remove these files after the files are uploaded. I am faced with a 550 error whenever I try to delete anything.
The created directory has chmod permissions 0777 and the uploaded files have permissions 0666 (I've tried 0644). My FTP program says that these uploaded files have owner/group "48 48" whereas all other files on the system are "1006 1006". I have done some research on this issue but I have not found out much. I believe there is something wrong with these files' owner/group. These settings might be set in accordance with apache, perhaps?
I have specified chmod permissions in mkdir() and chmod() is run after each file is uploaded to change it's permissions. I have tried using copy() in place of move_uploaded_file() without any luck. What can I do to make sure these files have the correct owner/group and are able to be deleted and viewed?
Thank you in advance!