Bug #77680 [Opn->Csd]: recursive mkdir on ftp stream wrapper is incorrect

From: Date: Mon, 25 Mar 2019 16:46:44 +0000
Subject: Bug #77680 [Opn->Csd]: recursive mkdir on ftp stream wrapper is incorrect
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220176@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77680&edit=1 ID: 77680 Updated by: nikic@php.net Reported by: calin dot don at gmail dot com Summary: recursive mkdir on ftp stream wrapper is incorrect -Status: Open +Status: Closed Type: Bug Package: Directory function related PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Automatic comment on behalf of vladtemian@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=ec2ecb7e12b96f8f95af2885d173a0d46c88e190 Log: Fix bug #77680: Correctly implement recursive mkdir on FTP stream Previous Comments: ------------------------------------------------------------------------ [2019-03-01 15:47:19] cmb@php.net The following patch has been added/updated: Patch Name: fix-77680 Revision: 1551455239 URL: https://bugs.php.net/patch-display.php?bug=77680&patch=fix-77680&revision=1551455239 ------------------------------------------------------------------------ [2019-02-28 12:38:20] calin dot don at gmail dot com Description: ------------ Recursive mkdir on ftp stream wrapper is incorrectly implemented. It issues a CWD and MKD without a required path parameter for the root folder. Test script: --------------- <?php mkdir("ftp://localhost:2121/one/two", 0755, true); Expected result: ---------------- Recursively create the directory structure. Actual result: -------------- Fails becuase it creates invalid sequence of ftp commands: 2019/02/28 13:43:12 INFO : f91b572012ab40453052: > CWD /one 2019/02/28 13:43:13 INFO : f91b572012ab40453052: < 550 Directory change to /one failed: file does not exist 2019/02/28 13:43:13 INFO : f91b572012ab40453052: > CWD 2019/02/28 13:43:13 INFO : f91b572012ab40453052: < 553 action aborted, required param missing 2019/02/28 13:43:13 INFO : f91b572012ab40453052: > MKD 2019/02/28 13:43:13 INFO : f91b572012ab40453052: < 553 action aborted, required param missing ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77680&edit=1

« previous php.bugs (#220176) next »