Hi
I'm developing a website with PHP 5 and Apache on CentOS.
There is a php page to upload files to webserver and some FTP users need to access to these uploaded files.
So I create a new group named G1 and add this group to both apache and FTP users.
Then set the permission of upload destination folder to 774, set owner to FTP user account and set group to G1.
When I try to upload file from php page, the following warning occur
Warning: move_uploaded_file(../papers/myfile.doc) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/httpd/vhosts/mydomain/httpdocs/mysite/upload-form.php on line 93
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpuXqVpb' to '../papers/myfile.doc' in /home/httpd/vhosts/mydomain/httpdocs/mysite/upload-form.php on line 93
When I click Refresh button on this warning page, the following message appear with Resend and Cancel button.
"To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation)
that was performed earlier.".
I click Resend, the same warning page with different tmp file occur.
The strange thing is after I click Refresh button 4 or 5 time, the file is successfully uploaded and no warning appear.
Then I try again for another file, the same warning appear again. And I need to click Refresh 4 or 5 to upload success.
Please help me to find out what is the source of issue.
Thanks