2012-02-11 14 views
8

Magento documentation tells us to do this:インストーラを過ぎて私たちを取得しますMagentoを実行するにはどのような権限が必要ですか?

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と同じようにインストールフレンドリーに近いです。あともうちょい!

+1

トン。 Magento Connectで作業する前に、すべてを777に設定し、必要なものをインストールした後、権限を推奨に戻すことは珍しいことではありません。 – pspahn

答えて

9

開発環境にある場合、これは移動するための方法である:

chmod -R 777 /magento-directory/ 

そうでなければ、これは実行する必要があります。

find . -type f -exec chmod 644 {} \; 
find . -type d -exec chmod 755 {} \; 

最初の行には、フォルダを見つけ、755にそれらをchmodします。 2番目のファイルを見つけ、644にchmodします。

投稿者Magento wiki articleから。

+0

とった。それは完全に安全とは思われません。より詳細な権限が記載されている他のドキュメントはありますか? – 010110110101

+0

Magentoの上記のfindとstuffはMagentoの適切なパーミッションです。ただし、Webサーバーも同様に実行されているユーザーがファイルを所有している限りです。 Magentoに含まれている.htacessは、Webサーバーから見えないものをロックアウトします。 –

+0

@VernBurtonなので、 'chown ftpuser:www-data public_html -R'を設定し、' 664'と '775'を使って上記を行うのは意味がありますか? –

18

次のスクリプトを使用して、毎回実行してください。

今後、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 
+0

新しいユーザーグループについて説明した変更を行ったことがありますか? – KPheasey

-2

公式ドキュメントにより示唆されるように、権限を設定するには、次のコマンドを使用します。

find . -type f -exec chmod 400 {} \; 

find . -type d -exec chmod 500 {} \; 

find var/ -type f -exec chmod 600 {} \; 

find media/ -type f -exec chmod 600 {} \; 

find var/ -type d -exec chmod 700 {} \; 

find media/ -type d -exec chmod 700 {} \; 

chmod 700 includes 

chmod 600 includes/config.php 

を私はまた、これらのタスクを自動化するための完全なシェルスクリプトを書きました:ボーナスとしてmage-set-perms

スクリプトは、トリップワイヤや補佐官などのセキュリティとデータ整合性ツールにも穏やかです。

-1

以下のリンクはpermissi on Magento

ここではMagentoのために実行する必要がある許可があります。そこにMagentoのアクセス権を設定することで利用可能な情報の

find . -type f -exec chmod 644 {} \; 
find . -type d -exec chmod 755 {} \;  
find ./var -type d -exec chmod 777 {} \;  
find ./media -type d -exec chmod 777 {} \; 
chmod 777 ./app/etc    
chmod 644 ./app/etc/*.xml  

http://www.letsknowit.com/permissions-needed-to-run-Magento

+0

このリンクは質問に答えるかもしれませんが、答えの本質的な部分をここに含めて参考にしてください。リンクされたページが変更された場合、リンクのみの回答は無効になります。 –

関連する問題