gpt4 book ai didi

magento - 运行 Magento 需要什么权限?

转载 作者:行者123 更新时间:2023-12-02 09:42:26 24 4
gpt4 key购买 nike

Magento documentation tells us to do this :

chmod -R o+w media var
chmod o+w app/etc

这让我们通过了安装程序。

接下来,我想从 Magento Connect 下载主题。不幸的是,这引发了一个似乎与权限相关的错误。

Settings has not been loaded. Used default settings
Config file does not exists please save Settings
Warning: Your Magento folder does not have sufficient write permissions.

需要什么权限才能通过此操作?

我还看到有关连接字符串的错误。

Connection string is empty

当我们这样做时,必须设置哪些权限才能使 Magento 充分发挥作用(并且安全)?

我意识到 Magento != Wordpress。它与 Wordpress 一样易于安装。只要多一点点!

最佳答案

我使用以下脚本,并时不时地运行它。

以后,我将在其末尾添加 chown -R root.www-pub,将所有需要修改代码的用户添加到 www-pub 组,并将 umask 设置为 0002。与此同时,下面的脚本运行良好。

#!/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

关于magento - 运行 Magento 需要什么权限?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9244596/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com