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)

Hjalp dette svar dig?

 Print denne artikel

Læs også

File Integrity Check

Posted by taydu3000, 01-15-2008, 04:01 AMAre the following file from Cpanel? Cpanel just update...

Trouble Enabling DMA Mode on IDE Drive

Posted by GriffinRUN, 04-23-2009, 12:14 AMI cannot enable DMA mode on /dev/hda when attemping to...

Need Shell script to add prefix to multiple files' name.

Posted by viettechorg, 03-25-2007, 02:09 PMHello, Does anyone know any of the shell script(or...

Removal of wget generated files

Posted by ladless, 09-19-2008, 03:19 PMHi there. I have several cronjobs set up like the...

Cannot open database asp.net

Posted by Faiyaz, 09-22-2008, 03:02 PMCannot open database "DATABASENAME" requested by the login....