|  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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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: Mon Oct 26 01:01:23 2020 UTC