php.net |  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
Description:
------------
---
From manual page: http://www.php.net/function.rename
---
"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: https://bugs.php.net/bug.php?id=71035

Thanks.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-28 13:01 UTC] cmb@php.net
-Package: Documentation problem +Package: Filesystem function related
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Thu Jul 19 13:01:25 2018 UTC