rename()実行時に'Operation not permitted'が発生する
PHPでrename()を使ったら'Operation not permitted'とエラーが表示された。
ファイルを確認したところ、移動は完了していた。PHPのバグ(?)が原因で、異なるパーティションへのファイルの移動時にエラーが発生していたらしい。
PHP :: Doc Bug #50676 :: rename across Volumes throws warning "Operation not permitted"
エラーを出さずにファイルを移動するには、元のファイルをコピーしてから、元のファイルを消すという処理をする必要がある。
if(copy($source, $distination)) { unlink($source); }