From: egor dot chernodarov at gmail dot com Operating system: Debian GNU/Linux 6.0 PHP version: 5.3.18 Package: FTP related Bug Type: Bug Bug description:ftp_chmod returns false for response "250 Changed."
Description: ------------ NcFTPd server returns "250 Changed." (not 200 as many other servers): [root@vps ~]# ftp ****.com Connected to ****.com (64.***.***.***). 220 ****.com NcFTPd Server (licensed copy) ready. Name (*****.com:root): **** 331 User test okay, need password. Password: 230-You are user #1 of 20 simultaneous users allowed. 230- 230 Restricted user logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> cd public_html/test345 250 "/public_html/test345" is new cwd. ftp> ls page9.php 227 Entering Passive Mode (***,***,**,***,***,**) 150 Data connection accepted from ***.***.***.**:****; transfer starting. -rwxr-xr-x 1 test test 14637 Jul 28 00:06 page9.php 226 Listing completed. ftp> chmod 777 page9.php 250 Changed. ftp> ls page9.php 227 Entering Passive Mode (*****) 150 Data connection accepted from ****:46124; transfer starting. -rwxrwxrwx 1 test test 14637 Jul 28 00:06 page9.php 226 Listing completed. Code "250" looks as valid for such operations: 250 - Requested file action okay, completed. But ftp_chmode returns "true" only for code 200. Test script: --------------- Just try ftp_chmod for any file on NcFTPd server. Permissions successfully changed but result is "false". Not sure if any other servers returns 250, but I've tested on ncftpd-2.8.3-freebsd6.0-i386-export.tar.gz. Expected result: ---------------- Expect "true" for successful ftp_chmod on NcFTPd server. Actual result: -------------- ftp_chmod always returns false. As workaround: ftp_site($connectHandler, sprintf('CHMOD %o %s', $mode, $absolutePath)); -- Edit bug report at https://bugs.php.net/bug.php?id=63509&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63509&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63509&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63509&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63509&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63509&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63509&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63509&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63509&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63509&r=support Expected behavior: https://bugs.php.net/fix.php?id=63509&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63509&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63509&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63509&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63509&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63509&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63509&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63509&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63509&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63509&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63509&r=mysqlcfg