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
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: 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

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 00:01:30 2024 UTC