php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27790 PHP chmod's totaly wrong
Submitted: 2004-03-31 01:29 UTC Modified: 2004-03-31 01:38 UTC
From: postmaster at rrnet dot se Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.3.4 OS: Slackware 9.1
Private report: No CVE-ID: None
 [2004-03-31 01:29 UTC] postmaster at rrnet dot se
Description:
------------
PHP have some strange problem, to set file-permissions on my machine (Slackware 9.1).

It sets them totaly wrong.

Software is PHP 4.3.4 on Apache 1.3.29.
Filesystem is ext3.
PHP is NOT in safe_mode.

Nothing more specific to report.

Reproduce code:
---------------
$file = "/home/dream/public_html/Upic/1/2.jpg";
chmod($file,'0644');

the same result happened with chmod($file,'644');

Expected result:
----------------
-rw-r--r--  1 nobody nobody 28739 Mar 31 08:30 2.jpg


Actual result:
--------------
--w----r-T  1 nobody nobody 28739 Mar 31 08:30 2.jpg


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-31 01:31 UTC] postmaster at rrnet dot se
Sorry, forgot to say that it gets everything from an uploadscript, and then sets the right chmod to be able to delete the file later if needed.
 [2004-03-31 01:38 UTC] alan_k@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

the mode is octel: eg. 0644 - not a string '644'
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 26 11:01:30 2024 UTC