【发布时间】:2014-02-08 17:59:29
【问题描述】:
我正在尝试安装respondCMS,它告诉我需要授予 apache 写入文件的权限。
我 cd'ed 到 htdocs 文件夹,然后运行这个终端命令
chown -R apache /sites
但上面写着chown: apache: illegal user name。
【问题讨论】:
标签: php apache content-management-system chown respondcms
我正在尝试安装respondCMS,它告诉我需要授予 apache 写入文件的权限。
我 cd'ed 到 htdocs 文件夹,然后运行这个终端命令
chown -R apache /sites
但上面写着chown: apache: illegal user name。
【问题讨论】:
标签: php apache content-management-system chown respondcms
Apache 用户通常不叫 apache,而是 www 或 www-data。通过以下方式检查:
cat /etc/apache2/envvars | grep 用户
【讨论】:
MAMP,我直接从respondCMS 的文档中复制了该命令。
chown -R www-data . 和 chmod u+w . -R
如果您在 Mac 上使用 MAMP(我假设,因为 Windows 版本仍处于测试阶段),那么您需要将文件权限更改为您自己的用户名和组人员。这就是 MAMP 运行 Apache 的方式。在“真实”的 LAMP 堆栈上,情况会大不相同。
因此,如果您的 Mac 用户名为“mendocino”,请更改该目录中的权限
chown -R mendocino:staff /sites
【讨论】: