#35980 [Bgs->Asn]: touch() works on files but not on directories (on Linux this works perfectly)
| From: | nlopess@php.net | Date: | Sat, 14 Jan 2006 23:15:31 +0000 |
| Subject: | #35980 [Bgs->Asn]: touch() works on files but not on directories (on Linux this works perfectly) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-91928@lists.php.net to get a copy of this message | ||
ID: 35980
Updated by: nlopess@php.net
Reported By: pavel dot hlousek at gmail dot com
-Status: Bogus
+Status: Assigned
Bug Type: *Directory/Filesystem functions
Operating System: Win2K
PHP Version: 4.4.1
-Assigned To:
+Assigned To: nlopess
New Comment:
This is a bug in microsoft's utime implementation.
However, Perl is able to workaround this bug with SetFileTime(). I'll
see if I can cook a nice patch.
Previous Comments:
------------------------------------------------------------------------
[2006-01-14 10:58:44] sniper@php.net
"Permission denied" means that the user which the script was run as
does not have permissions to do it. It's not a PHP bug.
------------------------------------------------------------------------
[2006-01-12 16:17:05] pavel dot hlousek at gmail dot com
Description:
------------
<?php touch('non-existing-file'); ?> - Correct. Creates a new file.
<?php touch('existing-file'); ?> - Correct. Changes file's mtime.
<?php touch('existing-directory'); ?> - Wrong on Win2K. Does not change
directory's mtime. Correct on Linux. I did not test any other Win32
platforms. Filesystem: NTFS. The user running the script owns
'existing-directory'. safe_mode=Off.
Reproduce code:
---------------
<?php touch('existing-directory'); ?>
Expected result:
----------------
Change mtime of an existing directory.
Actual result:
--------------
Utime failed: Permission denied in <fullpath/to/existing-directory> on
line 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35980&edit=1