0

我是 magento 和 linux 的新手。在我的本地主机上安装 Magento 时。我收到以下警告:

Path "/var/www/magic-of-motoring/app/etc" must be writable.
Path "/var/www/magic-of-motoring/var" must be writable.
Path "/var/www/magic-of-motoring/media" must be writable.

我做了一些研究,但我不知道应该更改哪个文件路径或目录。谢谢你

4

2 回答 2

1

将这些文件夹的所有者(全部 3 个,仅用于更改最后一个文件夹 - 媒体的所有者的示例)更改为 www-data 或将其模式更改为 777。

chown www-data:www-data -R /var/www/magic-of-motoring/media

于 2013-07-23T15:42:48.500 回答
1

我会在运行 Magento 需要哪些权限?

为了完整起见,将其粘贴在下面。

#!/bin/bash

if [ ! -f ./app/etc/local.xml ]; then
    echo "-- ERROR"
    echo "-- This doesn't look like a Magento install.  Please make sure"
    echo "-- that you are running this from the Magento main doc root dir"
    exit
fi

if [ `id -u` != 0 ]; then
    echo "-- ERROR"
    echo "-- This script should be run as root so that file ownership"
    echo "-- changes can be set correctly"
    exit
fi

find . -type f \-exec chmod 644 {} \;
find . -type d \-exec chmod 755 {} \;
find ./var -type d \-exec chmod 777 {} \;
find ./var -type f \-exec chmod 666 {} \;
find ./media -type d \-exec chmod 777 {} \;
find ./media -type f \-exec chmod 666 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
于 2013-07-23T16:02:23.103 回答