WordPressをインストールして、FTPがーっと言われた時の対処
解決方法
インストールしたWordPressのディレクトリ以下をapache(正確にはhttpd.confの中のユーザー)に変更するとよい。
1 |
sudo chown -R (ユーザー):(グループ) (installしたブログのディレクトリ)/ |
ここで自分のユーザー・グループがわからない場合はhttpd.confで調べてください(下記参照)。
本文
ちょっと新しくワードプレスをインストールして、テーマを入れ替えたりしてた時に、
こんな感じのFTPの接続情報がやらの設定を聞かれました。特に設定もしてなかったので、なんぞ?と立ち止まり。
chownを使って所有権を変更
このエラーが出るのが、どうやらスクリプトの実行者と中のファイルの所有者が同じかどうかを確かめているらしいです。
詳しく調べている方のサイトはこちら
そうと分かればあとは自分の環境の設定を調べて所有者を変更!
記してある場所は、特に変更指定なければ
/etc/httpd/conf/httpd.conf
この中の
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # . On SCO (ODT 3) use "User nouser" and "Group nogroup". # . On HPUX you may not be able to use shared memory as nobody, and the # suggested workaround is to create a user www and use that user. # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET) # when the value of (unsigned)Group is above 60000; # don't use Group #-1 on these systems! # User ***** Group ***** |
最後の*****のところが自分の環境になりますので変更して見てください。
変更後、テーマをインストールしてみると・・・
GOOD!この表示が出ればインストール完了です!すぐ使いたい場合はゆうk