RHEL + PHP : writing files outside /var/www/html?

后端 未结 3 1799
日久生厌
日久生厌 2020-12-19 20:08

I\'m trying to open a file for read/write. I\'ve been developing on Ubuntu, and have had no problems whatsoever. Now it\'s time to deploy to the RHEL server, and I discove

3条回答
  •  隐瞒了意图╮
    2020-12-19 20:28

    To add some specifics to the accepted answer, I also had this exact problem and this command fixed it for me.

    chcon -R -t httpd_sys_content_t /path/to/file/it/does/exist/and/has/good/perms
    

提交回复
热议问题