php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49949 ftp_chmod function set permission incorrect!
Submitted: 2009-10-22 02:50 UTC Modified: 2009-10-23 06:08 UTC
From: contact at ireallyhost dot com Assigned:
Status: Not a bug Package: FTP related
PHP Version: 5.2.11 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: contact at ireallyhost dot com
New email:
PHP Version: OS:

 

 [2009-10-22 02:50 UTC] contact at ireallyhost dot com
Description:
------------
ftp_chmod function

Permission file incorrect!
when set permission from variable



Reproduce code:
---------------
:::::example:::::::
$file = 'path/example.php';
$permission = 0664; or $permission = "0664";

===ftp function==
ftp_chmod($conn_id, $permission,$file)
!! invalid permission file (result is 204)

but 

ftp_chmod($conn_id, 0664,$file)
!! Permission file 0664 is ok

Expected result:
----------------
$permission = 0664; or $permission = "0664";

ftp_chmod($conn_id, $permission,$file)


permission file is 0664




Actual result:
--------------
-

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-22 10:46 UTC] felipe@php.net
If you have a string '0664', you must to use octdec() function.

 [2009-10-23 06:08 UTC] contact at ireallyhost dot com
i'm sorry misunderstanding and ignorance,
thank you very much for take care.
...
 [2019-04-13 21:12 UTC]
The following pull request has been associated:

Patch Name: Update php_mysql.c
On GitHub:  https://github.com/php/pecl-database-mysql/pull/1
Patch:      https://github.com/php/pecl-database-mysql/pull/1.patch
 [2019-04-14 00:32 UTC]
The following pull request has been associated:

Patch Name: protect master branches except for the pecl repos against force pushes
On GitHub:  https://github.com/php/karma/pull/4
Patch:      https://github.com/php/karma/pull/4.patch
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri May 27 18:06:15 2022 UTC