Page 1 of 1

Denied File Upload

Posted: Fri Jun 21, 2002 12:12 am
by ace2600
When trying to upload a file through a form I get the following error:
Unable to create '/home/ranchsal/public_html/images/finalcdLogo.jpg': Permission denied in /home/ranchsal/public_html/test.php on line 49
The problem seems to come from this line "if (!copy($imgfile,"$newfile"))"
I copied the code from this site(which is helpful), so it should work. Why am I getting this error, does it have to do with my host? And more importantly how can I fix it. Heres a link to my site.Thank you!
-Ace
You can email me to for clarifications or more code at ace2600@hotmail.com

Posted: Fri Jun 21, 2002 2:42 am
by kaizix
you may have the chmod the directory images so that the server can write to it. 666 should do it i think.

...??

Posted: Sun Jul 28, 2002 2:30 pm
by Fábio Selinger
i have the same problem, and i used chmod but ...
warning chmod failed:Operation not permitted
what do i do?

Posted: Sun Jul 28, 2002 3:48 pm
by kaizix
that means it's a windows server.....if it's a webhost (and not your own computer) you'll have to get your host to change the permissions on the dir.

Posted: Mon Jul 29, 2002 1:47 am
by twigletmac
Fábio - please don't cross post.
Could anyone responding to him please do so here:
http://www.devnetwork.net/forums/viewtopic.php?t=1627

Mac