tom*_*ods 8 linux file-permissions
它总是让我感到困惑,如果一个文件夹具有读写权限,Apache + PHP就无法写入它.您必须结束授予apache执行权限才能在该文件夹中写入文件.为什么?
例如,使用chmod 664(其中构建组包含apache用户),apache将无法在此文件夹中写入临时缓存文件:
drw-rw-r-- 5 jenkins build 4096 Jun 15 13:05 cache
Run Code Online (Sandbox Code Playgroud)
而使用chmod 774 apache将能够将新文件写入该文件夹:
drwxrwxr-- 5 jenkins build 4096 Jun 29 11:44 cache
Run Code Online (Sandbox Code Playgroud)