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: 2020-11-05 15:37 UTC
From: info at mikekeran dot com Assigned: cmb (profile)
Status: Closed Package: Filesystem function related
PHP Version: 5.5.30 OS: Windows
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: info at mikekeran dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-28 13:01 UTC] cmb@php.net
-Package: Documentation problem +Package: Filesystem function related
 [2020-11-05 15:37 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2020-11-05 15:50 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=ccb1313e0cca25fe41f8fd8d46f43f2bfb4d3ff4
Log: Fix #71075: Update rename() docs to mention Windows-specific permissions issues
 [2020-11-05 15:50 UTC] phpdocbot@php.net
-Status: Verified +Status: Closed
 [2020-11-05 21:50 UTC] phpdocbot@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=c7ec3b455f6bf46d76d4e2ec110131a70a0283c5
Log: Fix #71075: Update rename() docs to mention Windows-specific permission
 [2020-12-30 11:58 UTC] nikic@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=2fe74c696c24cff2b6ca5d155294da2a9893243e
Log: Fix #71075: Update rename() docs to mention Windows-specific permission
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 11 14:01:27 2024 UTC