Bug #74357 [Opn->Fbk]: lchown fails to change ownership of symlink with ZTS
| From: | cmb@php.net | Date: | Thu, 09 Sep 2021 12:20:04 +0000 |
| Subject: | Bug #74357 [Opn->Fbk]: lchown fails to change ownership of symlink with ZTS | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-236488@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74357&edit=1
ID: 74357
Updated by: cmb@php.net
Reported by: msaladna at apisnetworks dot com
Summary: lchown fails to change ownership of symlink with ZTS
-Status: Open
+Status: Feedback
Type: Bug
Package: Filesystem function related
Operating System: CentOS 7.3
PHP Version: 7.1.3
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
What is the output of the following script:
<?php
echo "TS: ", PHP_ZTS, "\n";
is_link("foo") && unlink("foo");
symlink("/tmp", "foo");
lchown("foo", 99);
clearstatcache(true);
var_dump(lstat("foo")['uid']);
?>
And please check with any of the actively supported PHP
versions[1]?
[1] <https://www.php.net/supported-versions.php>
Previous Comments:
------------------------------------------------------------------------
[2017-04-01 04:07:34] msaladna at apisnetworks dot com
Description:
------------
Compiling PHP with ZTS affects performance of lchown and lchgrp.
PHP CLI compiled without ZTS:
./configure --disable-all
ZTS is above + '--enable-maintainer-zts'
Test script:
---------------
<?php
echo "TS: ", PHP_ZTS, "\n";
is_link("foo") && unlink("foo");
symlink("/tmp", "foo");
lchown("foo", 99);
var_dump(lstat("foo")['uid']);
?>
Expected result:
----------------
TS: 1
int(99)
Actual result:
--------------
TS: 1
int(0)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74357&edit=1