0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WindowsAzureWebサイトでNetCommons2のinstall.inc.phpをリードオンリーにしたり書き込み権限つけるスクリプト

Posted at

NetCommons2はwebapp/config/install.inc.phpが書き込み禁止になってたらインストール済み、書き込み権限あればインストーラー実行という仕組みになってます。

でWindowsAzureWebサイトだと手動でファイルの書き込み権限変更できなくて、インストール後にあれこれやるのに困ったので、権限変更するだけのファイルを作りました。

webapp/configにUPしてブラウザでアクセスしてください。
使い終わったら削除してくださいね。他の人にWritableにされちゃうとインストーラ表示されちゃうんで(^^;

<?php
if(isset($_POST['Writeable'])){
    chmod( "install.inc.php", 0644);
}
if(isset($_POST['ReadOnly'])){
    chmod( "install.inc.php", 0444);
}

?>
<html>
<body>
<form method="POST">
    <input type="submit" name="Writeable" value="Writeable" />
    <input type="submit" name="ReadOnly" value="ReadOnly" />
</fom>
</body>
</html>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?