Report this

What is the reason for this report?

failed to open stream: Permission denied Severity: Warning

Posted on November 30, 2017

When i trying to upload a file in registration form am getting below error.

<p>Severity: Warning</p> <p>Message: move_uploaded_file(./assets/uploads/textresumes/2319Test_Resume.docx): failed to open stream: Permission denied</p>

<p>Severity: Warning</p> <p>Message: move_uploaded_file(): Unable to move ‘/tmp/phpangslr’ to ‘./assets/uploads/textresumes/2319Test_Resume.docx’</p>

Am working in PHP Codeigniter web application , please tell me solution for this problem.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Use chmod and/or chown so your PHP user is allowed to write to that directory.

We don’t know your setup and so won’t bother with guessing. The web server on your machine must have permissions to write to the target folders. What you’re trying to do is security sensitive and I highly recommend you take the time to understand how permissions and file uploads work before you try to configure it.

can you please tell me the command ?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.