Page 1 of 1

Cannot copy file from TMP folder

Posted: Mon Jun 12, 2006 6:47 pm
by dwhswebhosting
When a file upload script tried to copy the file (using PHP) to copy from /tmp to my folder for further processing. it said cannot open, permission denied

Anyone know what would block such a thing.

This happened right after a server crash but everything seems fine.

I would think php can use the /tmp folder with no problems.

Posted: Mon Jun 12, 2006 6:52 pm
by John Cartwright
try move_uploaded_file() instead, that or php user does not have permission to the directory.

Posted: Mon Jun 12, 2006 7:17 pm
by dwhswebhosting
I'm wondering why it worked before the server crash and now it doesn't.

I'm trying to figure out what the server crash could of done to deny permissions for php to the /tmp folder.

Strange stuff....

Re: Cannot copy file from TMP folder

Posted: Mon Jun 12, 2006 7:54 pm
by Christopher
dwhswebhosting wrote:When a file upload script tried to copy the file (using PHP) to copy from /tmp to my folder for further processing. it said cannot open, permission denied
It does not sound like the permission problem is with your /tmp directory (it rarely is). It sounds like the usual problem that the folder to which you are copying the file. Make sure the user that the webserver is running as has write permission to that folder.

Posted: Mon Jun 12, 2006 9:27 pm
by dwhswebhosting
Great I will try that.. and post back.

Re: Cannot copy file from TMP folder

Posted: Mon Jun 12, 2006 10:31 pm
by dwhswebhosting
arborint wrote:
dwhswebhosting wrote:When a file upload script tried to copy the file (using PHP) to copy from /tmp to my folder for further processing. it said cannot open, permission denied
It does not sound like the permission problem is with your /tmp directory (it rarely is). It sounds like the usual problem that the folder to which you are copying the file. Make sure the user that the webserver is running as has write permission to that folder.
Wow that was it, he had it at 755 but needed 777 for the destination folder.

Image Thanks!