[netatalk-ja:0323] Re: spotlight = yes のとき開くだけでtimestamp更新

Oichinokata oichinokata @ oichinote.com
2014年 1月 13日 (月) 16:49:48 JST


FreeBSDでnetatalk 3.1.0にしていますが、
afp.confに、spotlight=yesを書くのを忘れました...。
デフォルトはnoですね。

今、大量のデータをコピー中なので、設定を変えられません。

デフォルト設定(splotlight=no)のまま、試してみました。以下の様な結果となりました。

ですが、ファイルが存在しない時に作ったファイルのタイムスタンプの表示が変わっています。
catでも変わります。

ファイルが存在するときに作ったタイムスタンプだと変わりません。
何故でしょう?

% ./check_timestamp.sh
+ touch test.html
+ ls -l test.html
-rw-------  1 oichi  wheel  0  1 13  2014 test.html
+ sleep 61
+ cat test.html
+ ls -l test.html
-rw-------  1 oichi  wheel  0  1 13 15:50 test.html
+ open test.html
+ ls -l test.html
-rw-------  1 oichi  wheel  0  1 13 15:50 test.html
+ sleep 61
+ cat test.html
+ ls -l test.html
-rw-------  1 oichi  wheel  0  1 13 15:50 test.html
% ./check_timestamp.sh
+ touch test.html
+ ls -l test.html
-rw-------  1 oichi  wheel  0  1 13 15:53 test.html
+ sleep 61
+ cat test.html
+ ls -l test.html
-rw-------  1 oichi  wheel  0  1 13 15:53 test.html
+ open test.html
+ ls -l test.html
-rw-------  1 oichi  wheel  0  1 13 15:53 test.html
+ sleep 61
+ cat test.html
+ ls -l test.html
-rw-------  1 oichi  wheel  0  1 13 15:53 test.html
% rm test.html 
remove test.html? y
% ./check_timestamp.sh
+ touch test.html
+ ls -l test.html
-rw-------  1 oichi  wheel  0  1 13  2014 test.html
+ sleep 61
+ cat test.html
+ ls -l test.html
-rw-------  1 oichi  wheel  0  1 13 15:55 test.html
+ open test.html
+ ls -l test.html
-rw-------  1 oichi  wheel  0  1 13 15:55 test.html
+ sleep 61
+ cat test.html
+ ls -l test.html
-rw-------  1 oichi  wheel  0  1 13 15:55 test.html

以上は、OS X 10.9.1の結果です。

同じ事を、Mac OS X 10.6.8でも試してみました。

% ./check_timestamp.sh 
+ touch test.html
+ ls -l test.html
-rw-r--r--  1 oichi  wheel  0 Jan 13  2014 test.html
+ sleep 61
+ cat test.html
+ ls -l test.html
-rw-r--r--  1 oichi  wheel  0 Jan 13 16:04 test.html
+ open test.html
+ ls -l test.html
-rw-r--r--  1 oichi  wheel  0 Jan 13 16:04 test.html
+ sleep 61
+ cat test.html
+ ls -l test.html
-rw-r--r--  1 oichi  wheel  0 Jan 13 16:04 test.html
% ./check_timestamp.sh
+ touch test.html
+ ls -l test.html
-rw-r--r--  1 oichi  wheel  0 Jan 13 16:17 test.html
+ sleep 61
+ cat test.html
+ ls -l test.html
-rw-r--r--  1 oichi  wheel  0 Jan 13 16:17 test.html
+ open test.html
+ ls -l test.html
-rw-r--r--  1 oichi  wheel  0 Jan 13 16:17 test.html
+ sleep 61
+ cat test.html
+ ls -l test.html
-rw-r--r--  1 oichi  wheel  0 Jan 13 16:17 test.html
% rm test.html 
% ./check_timestamp.sh
+ touch test.html
+ ls -l test.html
-rw-r--r--  1 oichi  wheel  0 Jan 13  2014 test.html
+ sleep 61
+ cat test.html
+ ls -l test.html
-rw-r--r--  1 oichi  wheel  0 Jan 13 16:29 test.html
+ open test.html
+ ls -l test.html
-rw-r--r--  1 oichi  wheel  0 Jan 13 16:29 test.html
+ sleep 61
+ cat test.html
+ ls -l test.html
-rw-r--r--  1 oichi  wheel  0 Jan 13 16:29 test.html

同じ様な結果となりました。Mac側の問題ではない?!

なお、check_timestamp.shの内容は、次の通りです。

#!/bin/sh -x
touch test.html
ls -l test.html
sleep 61
cat test.html
ls -l test.html
open test.html
ls -l test.html
sleep 61
cat test.html
ls -l test.html

spotlight=yesは、明日にでも試します。

お市

2014/01/13 14:23、HAT <hat @ fa2.so-net.ne.jp> のメール:

> HATです。昨日の夜発見したんですが...
> 
> netatalk 3.1.0で、spotlight = yesのとき、
> OS X側からファイルを開いた瞬間、そのファイルのタイムスタンプが現在時刻に
> 更新されます。
> 
> $ cd /Volumes/NetatalkVol
> 
> $ touch test.html
> 
> $ ls -l test.html
> -rw-r--r--  1 hat  staff  0  1 13 14:04 test.html
> 
> $ open test.html
> 
> $ ls -l test.html
> -rw-r--r--  1 hat  staff  0  1 13 14:05 test.html
> 
> $ cat test.html
> 
> $ ls -l test.html
> -rw-r--r--  1 hat  staff  0  1 13 14:05 test.html
> 
> Webブラウザで開いて更新されるということは、リードモードで開いても
> 更新されるということです。
> catコマンドだと問題ありません。
> 
> spotlight=noだと問題ありません。
> 
> Fedora 20 16bit
> Fedora 20 32bit
> Ubuntu 13.10 32bit
> で確認しました。
> 他の環境ではどうでしょうか。
> 
> このバグはファイルサーバ失格ではないかと...
> 
> -- 
> HAT



netatalk-ja メーリングリストの案内