I've been tasked with sorting out a rather dated file upload script that uses move_uploaded_file()
I cannot for the life of me get it to actually upload the file to a directory unless it has 777s (obviously I know 777s are bad). The directory is owned by apache (in fact the whole httpdocs has been recursively chown-ed to apache:apache)... but the file still won't upload. The permissions are 755.
I've checked the apache configuration and the user and group are both correct (group: apache user: apache), and the file is 58kb so well within the max upload limit of the server.
PHP is running as FastCGI module.
Any ideas on what is causing this? Thanks.