P太 (2002-08-04 (日) 12:16:40)
お世話になってます。
英字ページをタイムスタンプを変更せずに編集しようとすると、以下のワーニングが出ます。
Warning: utime failed: Operation not permitted in /usr/home0/******/virtual_html/trpg/file.php on line 44 Warning: Cannot add header information - headers already sent by (output started at /usr/home0/tinge3/virtual_html/trpg/file.php:44) in /usr/home0/******/virtual_html/trpg/index.php on line 283 Warning: Cannot add header information - headers already sent by (output started at /usr/home0/tinge3/virtual_html/trpg/file.php:44) in /usr/home0/******/virtual_html/trpg/skin/pukiwiki.skin.ja.php on line 1
↑PukiWiki-officialでは再現されないので、CVSをもらってきたあとの状態です。
どうやらページが英字WikiNameだと再現する模様。 :( -- P太 2002-08-04 (日) 10:03:21
CVSから落としたファイルに差し替えて、該当ファイルのパーミッションを確認してもおかしくないので、いろいろと調べたんですが。Wikiフォルダ内の.txtのパーミッションが666のモノと644のモノが混在。
666の所有者はサーバのIDなんですが、644の所有者はwwwとなってます。ナニこれ? :(
ちなみに、644から666へのパーミッションの変更は拒否されます。
でも、エラーの出る英字WikiNameファイルは666になってるんだよなぁ……。644にしてみてもよけいダメでした。 :( -- P太 2002-08-04 (日) 11:49:06
- $timestamp = @filemtime($dir.encode($page).".txt"); + $timestamp = filemtime($dir.encode($page).".txt");にすると、何かwarning出ませんか? -- ぱんだ 2002-08-04 (日) 13:39:31
前と同じwarningが出ますね。メッセージ自体は同じです。 -- P太 2002-08-04 (日) 14:03:49
名前 | 新規作成 | 時刻保持修正 | 所有者 | パーミッション |
TestFile | 問題なし | 問題なし | www | 644 |
テストページ | 問題なし | 問題なし | www | 644 |
新規作成・修正のテストしてみました。新しく生成されるのはやっぱりwwwの644ファイルですね。 -- P太 2002-08-04 (日) 14:19:59
touch コマンドでファイルのアクセス時間や修正時間を現在時刻に変更する場 合、実行するユーザーはファイルの所有者でなくても、そのファイルに対する 書き込みアクセス権があれば良い。そうでない場合には、そのファイルの所有 者である必要がある。
*** file.php 41 fputs($fp,$str); flock($fp,LOCK_UN); fclose($fp); + chmod($dir.encode($page).".txt", 0666); if($timestamp) touch($dir.encode($page).".txt",$timestamp); } *** file.php 104 if($cnt > $maxshow) break; } flock($fp,LOCK_EX); fclose($fp); + chmod(get_filename(encode($whatsnew)), 0666); }
う~ん、こんな状況になりました。 -- P太 2002-08-05 (月) 00:38:36
ページ名 | 新規作成 | 通常修正 | 時間保持修正 | パーミッション | 所有者 |
新規ページ | warning | warning | 問題なし | 666 | www |
日本語 | *** | warning | warning | 666 | UserID |
Warning: chmod failed: Operation not permitted in /usr/home0/****** /virtual_html/trpg/file.php on line 95 Warning: chmod failed: Operation not permitted in /usr/home0/****** /virtual_html/trpg/file.php on line 95 Warning: Cannot add header information - headers already sent by (output started at /usr/home0/******/virtual_html/trpg/file.php:95) in /usr/home0/tinge3/virtual_html/trpg/index.php on line 283 Warning: Cannot add header information - headers already sent by (output started at /usr/home0/******/virtual_html/trpg/file.php:95) in /usr/home0/tinge3/virtual_html/trpg/skin/pukiwiki.skin.ja.php on line 1
Warning: chmod failed: Operation not permitted in /usr/home0/****** /virtual_html/trpg/file.php on line 42 Warning: utime failed: Operation not permitted in /usr/home0/****** /virtual_html/trpg/file.php on line 44 Warning: Cannot add header information - headers already sent by (output started at /usr/home0/******/virtual_html/trpg/file.php:42) in /usr/home0/tinge3/virtual_html/trpg/index.php on line 283 Warning: Cannot add header information - headers already sent by (output started at /usr/home0/******/virtual_html/trpg/file.php:42) in /usr/home0/tinge3/virtual_html/trpg/skin/pukiwiki.skin.ja.php on line 1
***backup.php 49 backup_fputs($fp,$strout); backup_fputs($fp,$body); backup_fclose($fp); + chmod($realfilename, 0666); }
// $Id: init.php,v 1.53 2007/05/14 14:47:51 henoheno Exp $ 205行目~: foreach(array($defaultpage, $whatsnew, $interwiki) as $page){ if (! is_page($page)) touch(get_filename($page)); } // $Id: attach.inc.php,v 1.87 2007/07/30 14:30:14 henoheno Exp $ 197行目~: if (is_page($page)) touch(get_filename($page)); 644行目~: if (is_page($this->page)) touch(get_filename($this->page)); // $Id: dump.inc.php,v 1.40 2007/05/13 22:11:23 teanan Exp $ 665行目~: // 既に同じファイルがある場合は上書きされる $fpw = @fopen($name, 'wb'); if ($fpw !== FALSE) { flock($fpw, LOCK_EX); fwrite($fpw, $buff, $size); @chmod($name, 0666); @touch($name, $mtime); flock($fpw, LOCK_UN);