|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30284 chmod function NOT work
Submitted: 2004-09-30 04:56 UTC Modified: 2004-09-30 10:00 UTC
From: ipiranha at gmail dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.3.9 OS: FreeBSD 5.2.1-RELEASE
Private report: No CVE-ID: None
 [2004-09-30 04:56 UTC] ipiranha at gmail dot com
my freebsd box php chmod function not work.

chmod ("$upload_file_name", "0777");
NOT work. 

# ls -al
-rw-r--r--  1 nobody   nobody     159744 Sep 30 11:42 test1.txt

So I was modify my source code 

exec("chmod 0777 $upload_file_name");

# ls -al 
-rwxrwxrwx  1 nobody   nobody     159744 Sep 30 11:44 test2.txt

GOOD work.

So Oops.

chmod ("$upload_file_name", 0777); -> not work.
chmod ($upload_file_name, 0777);   -> GOOD work.

why ?

check this. ^^/


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-30 10:00 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Jun 20 00:01:24 2021 UTC