Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/279.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Zend Server CE的权限,守护程序:守护程序在OSX上没有足够的权限_Php_Macos_Webserver_File Permissions_Directory Permissions - Fatal编程技术网

Php Zend Server CE的权限,守护程序:守护程序在OSX上没有足够的权限

Php Zend Server CE的权限,守护程序:守护程序在OSX上没有足够的权限,php,macos,webserver,file-permissions,directory-permissions,Php,Macos,Webserver,File Permissions,Directory Permissions,奇怪的是,服务器无法再调整图像大小,因为它没有足够的写入权限。当我检查要将调整大小的图像写入的目录的权限时,我看到: 用户名职员 执行echo exec(“whoami”)后; 在检查httpd.conf时,我看到服务器的用户和组是daemon:daemon(这似乎是OSX安装中Zend server CE的默认设置)。我应该怎么做才能再次拥有足够的权限。我是否应该将我的目录转到daemon:daemon(什么不起作用)。我应该更改服务器的用户还是其他什么吗?我真的取决于您是在野外生产还是在私人

奇怪的是,服务器无法再调整图像大小,因为它没有足够的写入权限。当我检查要将调整大小的图像写入的目录的权限时,我看到:

用户名职员

执行echo exec(“whoami”)后;
在检查httpd.conf时,我看到服务器的用户和组是daemon:daemon(这似乎是OSX安装中Zend server CE的默认设置)。我应该怎么做才能再次拥有足够的权限。我是否应该将我的目录转到daemon:daemon(什么不起作用)。我应该更改服务器的用户还是其他什么吗?

我真的取决于您是在野外生产还是在私人生产中使用它。如果是我,我只需浏览目录,以便仅与服务器一起使用。如果您允许访问该组,您将打开对更多内容的访问。

我想,接触web服务器用户没有任何意义——Apache作为专用用户运行,而不是访问您的所有个人文件是有意义的

根据我的经验,解决这个问题的最佳方法是将文件的组更改为
守护进程
,并使其组可写,但保留文件的所有者,以便您也可以编辑/删除它。在OS X终端上,这是通过以下方式完成的:

$ sudo chgrp daemon <file>
$ sudo chmod 664 <file>
$sudo chgrp守护程序
$sudo chmod 664
显然,将
替换为您想要访问的文件名

另一个简单的解决方法是在文件上运行
chmod 666
,使其在世界范围内可写,但如果您以任何方式关心安全性,则不建议这样做(在您自己的开发环境中可以,但决不在生产或共享环境中)