Hey there,
I’m trying to write a simple bit of code to upload a file. The annoying thing is that this code was working a week or two ago when I first wrote it, and now it’s not. The problem comes when I try to move the uploaded file from the tmp directory to its final destination and I get the old “…failed to open stream: Permission denied in…” The folder permissions are 0755, and can’t be chmod’d (“Operation not permitted in…”). Also, I’m not sure how to SSH to this server, so can’t get to the folder that way – anyway, I’m not sure I want to set the permissions to 0777.
Is it possible to make my page log into the server so that it’s not just an anonymous user running the script?
Even if I log in to the cpanel of the site from this computer, I still get the permissions error – I wondered if that might have been the difference between last time and this time; obviously not.
Any suggestions?!
Big thanks in advance,
Mat
[Edit: ALSO, there appears to be two folders with my php in it – …/www/ and …/public_html/ $_SERVER[‘document_root’] indicates that the file is running in public_html, but I’m pretty sure I upload to www – are the two folders just mirrors of each other or what?!?!]