Doc #50676 [Com]: rename across Volumes throws warning "Operation not permitted"
| From: | ben at indietorrent dot org | Date: | Thu, 02 Jul 2015 15:34:46 +0000 |
| Subject: | Doc #50676 [Com]: rename across Volumes throws warning "Operation not permitted" | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-12494@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=50676&edit=1
ID: 50676
Comment by: ben at indietorrent dot org
Reported by: andreas at heigl dot org
Summary: rename across Volumes throws warning "Operation not
permitted"
Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: Mac OS X 10.6
PHP Version: 5.3.1
Assigned To: aharvey
Block user comment: N
Private report: N
New Comment:
@jorgex0
No, you are not correct. The documentation has indeed been updated. From the Changelog section at http://php.net/rename :
4.3.3 rename() may now be able to rename files across partitions on *nix based systems, provided the
appropriate permissions are held. Warnings may be generated if the destination filesystem
doesn't permit chown() or chmod() system calls to be made on files â for example, if the
destination filesystem is a FAT filesystem.
Previous Comments:
------------------------------------------------------------------------
[2013-10-30 13:59:45] jorgex0 dot o at gmail dot com
This isn't documented, for what I see. Am I right?
------------------------------------------------------------------------
[2010-09-06 06:05:22] aharvey@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Committed a slight variation on what I originally proposed, mostly to note that FAT filesystems are
the most likely culprits here.
------------------------------------------------------------------------
[2010-09-06 06:05:04] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=303064
Log: Fix doc bug #50676 (rename across Volumes throws warning "Operation not
permitted").
------------------------------------------------------------------------
[2010-09-03 20:51:51] pajoye@php.net
See your own comment :-)
------------------------------------------------------------------------
[2010-09-03 09:19:20] sta at netimage dot dk
I would like to second the suggestion of aharvey@php.net about making this a Documentation issue. I
just spend 2 ours trying to figure out why rename() started spitting out warnings and still returned
true.
It could be something like
<blockquote>
<p>
<b class="note">Note</b>:
<span class="simpara">
If $oldname and $newname are on different partitions (on *nix based systems) the function might emit
a warning "Warning: rename(oldfil,newfile): Operation not permitted" and still succeed.
The reason is that internally the rename is done by copying the file, and attempting chown() and
chmod() on the new file - and these operations can fail.
</span>
</p>
</blockquote>
FreeBSD, Apache 2.2, PHP 5.3.3.
Thanks for all the good work.
/Søren Thing
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=50676
--
Edit this bug report at https://bugs.php.net/bug.php?id=50676&edit=1