How do i secure a web server's image upload directory?

前端 未结 2 1870
忘了有多久
忘了有多久 2020-12-13 03:12

For my web application, people can upload images from a web form to my web server.

What should I set the CHMOD settings for that image upload directory so th

2条回答
  •  生来不讨喜
    2020-12-13 03:19

    Chmod on the directory can't do this, and moreover your web server may interpret .php as executable no matter what the mode is. You'll probably want to specify what server you're using, there may be a .htaccess or similar directive you can use.

    Note that 'execute' on directories means 'can access files inside the directory', so that must be set if you want your web server to have access to the files inside...

提交回复
热议问题