#30164 [Opn->Bgs]: touch won't change symbolic links
| From: | tony2001@php.net | Date: | Sat, 12 Feb 2005 22:29:12 +0000 |
| Subject: | #30164 [Opn->Bgs]: touch won't change symbolic links | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-73960@lists.php.net to get a copy of this message | ||
ID: 30164
Updated by: tony2001@php.net
Reported By: mave at clanteamtreff dot com
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: Linux ( Debian 3.0 r2 )
PHP Version: 5.0.0
New Comment:
No bug in PHP.
That's the way libc's utime() and others work: they change the file,
not the link itself.
There are also some syscalls that work with symlinks: lchown, lchmod &
lutimes, but as far as I can see they are very system dependant and
adding their analogues will probably cause a lot of #ifdef mess.
Previous Comments:
------------------------------------------------------------------------
[2004-09-20 11:09:54] mave at clanteamtreff dot com
Symbolic Links dont work also with the Funktions :
bool chgrp ( string filename, mixed group)
bool chmod ( string filename, int mode
bool chown ( string filename, mixed user)
...
------------------------------------------------------------------------
[2004-09-20 10:49:31] mave at clanteamtreff dot com
Description:
------------
the command
bool touch ( string filename [, int time [, int atime]])
only works with regular files. I have to change some times on Symbolik
links. The OS Cmd touch can also change times of Symbolik links.
Currently i use this, but it issnt really good.
(sorry for my bad english, i hope you understand it)
Reproduce code:
---------------
<?php
// This works
$FileName = "/path/file";
touch($FileName, mktime(0,0,0,1,1,1990) );
// This dont works
$FileName = "/path/link";
touch($FileName, mktime(0,0,0,1,1,1990) );
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30164&edit=1