Getting around PHP safe mode to write to server. Is it possible?

前端 未结 3 407
长情又很酷
长情又很酷 2021-01-15 05:32

I have got the following problem since the server has safe mode turned on, and directories are being created under different users:

  1. I upload my script to the s
3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-15 05:58

    I have had some success with setting the group bit of the upload directory to sticky. PHP can then create directories inside it and write to it.

    http://en.wikipedia.org/wiki/Setuid#setuid_and_setgid_on_directories

    chmod g+s directory

提交回复
热议问题