警告:您的Magento文件夹没有足够的写入权限

时间:2013-04-19 05:23:04

标签: magento

我是Magento的新手,我正在尝试通过magento连接管理器安装主题,我复制并粘贴扩展密钥然后单击安装然后继续。我收到错误'警告:您的Magento文件夹没有足够的写权限。“

请给出一些解决方案。非常感谢任何帮助。

7 个答案:

答案 0 :(得分:32)

转到Magento主目录,只为您的webroot授予权限。

e.g. (in ubuntu) : sudo chown -R www-data .

您还可以更改权限

chmod 777  -R downloader/*

我希望它有所帮助。

[编辑]

在magento目录中如何(如果需要,请使用sudo获取以下命令。):

find . -type d -exec chmod 775 {} \;
find . -type f -exec chmod 664 {} \;

对于Magento商店的正常操作或安装,只需要写入2个文件夹:

/media - for web accessible files, such as product images
/var - for temporary (cache, session) and import/export files

Source here

答案 1 :(得分:10)

重置文件权限:

find . -type d -exec chmod 775 {} \;
find . -type f -exec chmod 664 {} \;
chmod 777 -R downloader var media

答案 2 :(得分:10)

就我而言,这还不够。我不得不将777 permision也设置为父文件夹 - public_html(非递归)。

答案 3 :(得分:1)

以下是我编写的完整shell脚本,可帮助您设置Magento安装的权限/所有权:mage-set-perms

shell脚本基于Magento官方文章here

的建议

答案 4 :(得分:0)

让我使用此重置权限:

chmod -R 777 media/
chmod -R 755 var/

我按照此网址中的一些说明操作: http://www.magentocommerce.com/wiki/groups/227/resetting_file_permissions

答案 5 :(得分:0)

我使用了列出的其他解决方案,例如:

cd /var/www/html
find . -type d -exec chmod 775 {} \;
find . -type f -exec chmod 664 {} \; 
chmod -R 777 downloader var media

但我也必须这样做:

chown apache:apache /var/www/html

由于Web根目录仍由'root:root'拥有并导致问题(通过继续显示Magento错误消息)。

答案 6 :(得分:0)

在所有这些方法中,有效的是 public_html# find . -type d -exec chmod 775 {} \; chgrp -R www-data

这将返回使用本地文件系统而不是FTP的功能

755没有创建和删除组的权限,因此775可以正常工作

将/ media和/ var权限返回给/public_html/media# find . -type d -exec chmod 777 {} \; /public_html/var# find . -type d -exec chmod 777 {} \;