Still don't understand file upload-folder permissions

后端 未结 4 1896
不思量自难忘°
不思量自难忘° 2021-01-26 02:12

I have checked out articles and tutorials.

I don\'t know what to do about the security of my picture upload-folder.

It is pictures for classifieds which should b

4条回答
  •  心在旅途
    2021-01-26 02:45

    You have to make sure the upload folder is owned by apache or whoever user is as which the http server is started.

    Alternatively you can use 775 owned by the UID who will be collecting the files and with as gid the group id as which the webserver is started.

    There are of course variations on these themes.

    As long as the webserver user or webserver group has permission to write in the folder, it will be fine for uploading.

    There are all kind of cornercases, but then we'll need more info about your setup.

提交回复
热议问题