php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27213 Touch does not work when not owner
Submitted: 2004-02-10 15:45 UTC Modified: 2004-02-10 17:52 UTC
From: phpbugs at mads dot sulau dot dk Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.3.4 OS: FreeBSD
Private report: No CVE-ID: None
 [2004-02-10 15:45 UTC] phpbugs at mads dot sulau dot dk
Description:
------------
The touch command dose not work, if the user (eg. www) is not owner of the file, and the file chmod is 0777, allowing a touch by the system.

Reproduce code:
---------------
<?php
/**
 * expects you created a file called touch_test not 
 * owned by the user running the script
 */
touch('touch_test', time());
?>

Expected result:
----------------
I expect the touch to work :)

Actual result:
--------------
Touch generates a error about permissions, eg:

Warning: touch(): Utime failed: Operation not permitted in /usr/local/lib/php/Cache/Container/file.php on line 159

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-10 17:52 UTC] sniper@php.net
Another braindead freebsd func:
http://www.freebsd.org/cgi/man.cgi?query=utime&sektion=3&apropos=0&manpath=freebsd

(not PHP "bug" at all, works just fine with Linux btw. :)


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 02:01:31 2024 UTC