php chmod() not changing permissions

后端 未结 4 1367
既然无缘
既然无缘 2021-01-12 04:43

I am having problems with a picture uploading script.

I know there are hundreds of the same questions, but I haven\'t found the one that would be work for me.

<
4条回答
  •  执笔经年
    2021-01-12 04:52

    I was having similar troubles using chmod, although the file was owned by apache:apache (webserver user). In my case SELinux was getting in the way, disabling it made this clear:

    sudo setenforce 0

    And the chmod works. Now on to figuring out how to make a SELinux exception for this case... (and don't forget to enable SELinux, of course)

提交回复
热议问题