PHP (permission level on the server)

Asked

Viewed 188 times

3

I created a php application that uploads files (PDF, images and JSON) that works correctly on my PHP 5.2.17 server, but on the client server, the application only works if I change the site folder permission to 777.

On my server I use 755 for the folders and 644 for the files and everything works properly, there are no errors in the application on my server, I use upload move to load the files.

Someone has clues about what might be happening?

  • Perhaps some configuration of the client’s OS or server has already tried to reinstall Lamp/wamp/xampp?

  • 3

    Probably the groups/users are different. Use ls -ahl /path/to or ll /path/to to check the user and the group to which the files belong.

  • "Someone has clues about what might be happening?".. happening where?

  • – dvd file upload does not work at the normal level of permission. Was that unclear? The upload only happens when I change the site folder permission to 777, which is against the default set by the client.

  • The 755 permission will give write permission only to the owner of the folder. Usually who does this is apache. You need to give permission to the apache user of the apache group: chown apache:apache -R /pasta/de/upload

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.