need urgent help!

Posted by Jerenn, 07-17-2007, 07:54 AM
I am really sorry cause I couldnt get where to make this post! one of my clients is receving this error : Warning: move_uploaded_file(../upload/adoptive_link/mdsmds.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/parsamds/public_html/c-panel/analysis.php on line 1049 what casues this error and what is the soloution!? Thanks

Posted by Jerenn, 07-17-2007, 07:57 AM
and I have to mention that all the names of files and folders are correct!

Posted by BigGorilla, 07-17-2007, 07:57 AM
You or the webserver doesn't have write permissions on the directory the uploaded file is being moved to. If you are in a phpsuexec or similar environment, you need to have 755 permissions on the directory, otherwise you may need 777.

Posted by erigid, 07-17-2007, 07:58 AM
It appears that the script /home/parsamds/public_html/c-panel/analysis.php is trying to upload a file to directory /home/parsamds/public_html/upload/adoptive_link/. Check the directory's permissions. You can either change the ownership of that directory to be owned by the webserver's user or something like chmod 777 /home/parsamds/public_html/upload/adoptive_link/. If that doesnt work check also the permissions for /home/parsamds/public_html/upload.

Posted by Jerenn, 07-17-2007, 08:19 AM
Thank you , I hope this solves the problem , I'll be back if he still had problems

Posted by Jerenn, 07-17-2007, 10:29 AM
another question .. by using permission 777 , will there be any problem about the security? thanks

Posted by erigid, 07-17-2007, 10:34 AM
777 means any user in your server can write to it. As far as security it depends on your server setup. You can also change the owner of that folder to be the webserver's user but user parsamds wont be able to write to it.

Posted by erigid, 07-17-2007, 10:36 AM
BTW, if you setup the sticky bit on the directory everyone can write to it but a user can only remove the files they created. Those are usually the permissions for /tmp. To setup the sticky bit you use 1777 instead of 777

Posted by SparkSupport, 07-17-2007, 10:43 AM
Make sure that you never have permission with 777 for folders and files, it is a major security threat.

Posted by Jerenn, 07-17-2007, 10:47 AM
sure thanks

Posted by erigid, 07-17-2007, 10:51 AM
I wouldn't call it a MAJOR security threat. It really depends on his server. I guess you can also do 733 but the web server user may need read access to that directory. Just use 777 for right now, see if it gets fixed, if it does, you know that was the problem. You can work your way up to secure it. If that wasnt the problem make sure to chmod it back to original permissions (probably 755)

آیا این پاسخ به شما کمک کرد؟

 پرینت این مقاله

در همین زمینه

Script help with CSF - how to temporarily unblock IPs

Posted by sharmaine1111, 04-22-2009, 11:12 PMHello I'm trying to create a script or WHM plugin...

Get stats out of Cs, Bf2, Quake and others

Posted by ExobiT, 09-23-2008, 12:14 AMHi, if i have some gameservers with quake, cs, css bf2, and...

Auto Forward

Posted by reliablets, 03-26-2007, 12:53 PMHello, My reseller account gives my users the option...

Any security risks with setting up server on home network?

Posted by Papa G, 06-28-2008, 04:09 PMAny security risks with setting up server on home network?...

order and login issues

Posted by zomby, 03-21-2007, 11:40 PMHi everyone, I have installed plesk as control panel for...