Question

failed to open stream: Permission denied Severity: Warning

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.


Submit an answer

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!

Sign In or Sign Up to Answer

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.

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 ?

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