1

Today I accidentally gave write permission to my index.php file to using sudo chmod +x index.php. I don't know what permission it had before.

My index.php contains a php script for collecting number of visitors and an another script for collecting referrer links. It also contains some pictures and css code and my webserver is Lighttpd

Did I made a mistake by giving index.php that permission? Can my website be hacked for it?

3
  • If hacker will able to reach till index.php then changing permission is not a big task for hacker. show your code contains a php script for collecting number of visitors and an another script for collecting referrer links. Generally Keeping permission 0644 is safe. Only Owner can write Jun 1, 2019 at 9:12
  • 1
    Questions about programming are off topic here. You should delete this and, instead, ask on stackoverflow.com webmasters.stackexchange.com/help/on-topic
    – Rob
    Jun 1, 2019 at 11:53
  • How are file permissions programming? If this were asked on SO, I think it would get closed it because there is no code involved. SO does have a relevant question for 2010 though: What permissions for PHP scripts/directories? Jun 3, 2019 at 16:35

0

Your Answer

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