#50676 [Opn->Bgs]: rename across Volumes throws warning "Operation not permitted"
ID: 50676
Updated by: iliaa@php.net
Reported By: andreas at heigl dot org
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: Mac OS X 10.6
PHP Version: 5.3.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
rename() can only work "normally" when operating on the same volume.
In your case it emulates rename via copy & delete. I would guess since
it cannot delete file from the original volume, it gives you an error
message.
Previous Comments:
------------------------------------------------------------------------
[2010-01-11 12:59:23] p dot szalko at gmail dot com
The same bug is in PHP 5.2.11 and Mac OS X 10.5
------------------------------------------------------------------------
[2010-01-06 10:16:00] andreas at heigl dot org
Description:
------------
When renaming files acros Volumes a warning is triggered that the
"Operation is not permitted.
The operation is executed though.
Reproduce code:
---------------
- Create two images and mount them (Image1, Image2).
- Disable the 'Ignore Owner'-Feature on both of them and set
permissions so the WebServer can access the files.
- Add a file to one of the mounted volumes (touch
/Volumes/Image1/testfile)
ini_set ( 'error_reporting', E_ALL );
ini_set ( 'display_errors', true );
rename ( '/Volumes/Image1/testfile', '/Volumes/Image2/testfile' );
Expected result:
----------------
The file /Volumes/Image1/testfile has been copied to
/Volumes/Image2/testfile ad the original file has been removed.
No error should be triggered
Actual result:
--------------
The file /Volumes/Image1/testfile has been copied to
/Volumes/Image2/testfile ad the original file has been removed.
Additionally the following error is triggered:
rename(/Volumes/Image1/testfile,/Volumes/Image2/testfile): Operation
not
permitted in renametest.php on line n
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50676&edit=1
Thread (8 messages)