|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #71075 Update rename() docs to mention Windows-specific permissions issues
Submitted: 2015-12-09 19:46 UTC Modified: 2017-01-28 13:01 UTC
From: info at mikekeran dot com Assigned:
Status: Open Package: Filesystem function related
PHP Version: 5.5.30 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: info at mikekeran dot com
New email:
PHP Version: OS:


 [2015-12-09 19:46 UTC] info at mikekeran dot com
From manual page:
"Attempts to rename oldname to newname, moving it between directories if necessary. If newname exists, it will be overwritten."

If newname is read-only, Windows will return an access denied error while Linux will overwrite the file, as expected. I suggest adding the following to the above description:

"On Windows, newname must be writable to be overwritten. On Linux, the containing directory must be writable, regardless of the permissions on newname."

If that is too wordy or detailed, I suggest just adding the first sentence.

See also:



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-28 13:01 UTC]
-Package: Documentation problem +Package: Filesystem function related
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Oct 25 02:01:24 2020 UTC