Not sure if this is a php configuration or linux file permission issue. The problem I'm having is when a file is uploaded through php using move_uploaded_file() into the directory which has group set to ubuntu and owner set to www-data, the uploaded file owner and group permissions change to www-data which causes problems for my python script to come in and perform its task on the uploaded file.
example:
move_uploaded_file($tempFile,$targetSAVE);
--$targetSAVE directory is set to:
group: ubuntu
owner: www-data
permissions: 0755
--php uploaded file changes owner and group to www-data
new file changes to:
group: www-data <-- need this set to *ubuntu*
owner: www-data
permissions: 0755
--python script needs the group of the uploaded file set to ubuntu
how can I configure php to to set ownership or group of uploaded file to ubuntu or if this is a linux file permission issue how can i fix this?
All directories and sub directories are set to: group: ubuntu owner: ubuntu permissions: 0755 except the directory the files are being uploaded to, this is set to:
group: ubuntu
owner: www-data
permissions: 0755