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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: phpbugs at mads dot sulau dot dk
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 05:01:33 2025 UTC