1

I have my files uploaded on Ubuntu server. Everything is working except file upload.

I have given the permission to all the files as 0644 and for the folders 0755.

As per the references i am supposed to change the folder permission to 0777 which i don't want to do.

Is there any other way to enable file upload on ubuntu server without changing the permission from 0755 to 0777 ?

5
  • 1
    "As per the references i am supposed to change the folder permission to 0777 which i don't want to do." this is a misconception, and you are right to not doing it, 777 should never be used except to perhaps test that X issue is indeed not a permission issue. However, 755 should, in most cases be good enough as long as your web / apache user is the owner of the folders you are trying to upload to, otherwise you might need to look into group permissions. Commented Apr 4, 2016 at 7:25
  • Ok so how do i look into group permissions? Please post if u have any reference Commented Apr 4, 2016 at 7:26
  • 1
    I'm not gonna do your research, google is your friend and he is willing to help you,. Commented Apr 4, 2016 at 7:27
  • Which web server are you using. It is an important detail here. Commented Apr 4, 2016 at 8:14
  • I am using Digital Ocean Commented Apr 4, 2016 at 8:16

1 Answer 1

2

Don't apply 777 permission to any of your files/folders in the server.

The files are not uploading mainly because of two reasons.

  1. Incorrect ownership (user:group)
  2. Incorrect upload path

This article will help to setup the proper file/folder ownership.

I hope this helps.

Sign up to request clarification or add additional context in comments.

3 Comments

I checked the path its correct. And the article didnt help me.
Maybe this: askubuntu.com/questions/6723/… But try to Google regarding folder ownership and permission. Hundreds of solutions are available for this.
Most of the solutions have said to change the permission to 0777

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.