Bug #62199 [Com]: is_readable() does not seem to tolerate crossing partitions inside a sambashare
| From: | sln at easyinspect dot io | Date: | Tue, 16 Oct 2018 12:11:42 +0000 |
| Subject: | Bug #62199 [Com]: is_readable() does not seem to tolerate crossing partitions inside a sambashare | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-217591@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62199&edit=1
ID: 62199
Comment by: sln at easyinspect dot io
Reported by: moodboom at gmail dot com
Summary: is_readable() does not seem to tolerate crossing
partitions inside a sambashare
Status: No Feedback
Type: Bug
Package: Directory function related
Operating System: linux (gentoo)
PHP Version: 5.3.13
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The problem still persists in version 7.2.11
Previous Comments:
------------------------------------------------------------------------
[2018-08-26 16:57:19] cmb@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
------------------------------------------------------------------------
[2018-07-08 14:49:47] cmb@php.net
Does this problem still persist for actively supported PHP
versions[1]?
[1] <http://php.net/supported-versions.php>
------------------------------------------------------------------------
[2013-01-24 07:50:37] lukx at lukx dot de
Bug #49620 seems to be similar and offers some more test cases.
------------------------------------------------------------------------
[2012-05-31 18:05:40] moodboom at gmail dot com
Note that the C function access() (which I believe is used by is_readable()) works as expected:
C code:
cout << "share: " << access("/remote/samba_share", R_OK) <<
endl;
cout << "local: " << access("/remote/samba_share/local_dir", R_OK)
<< endl;
cout << "second: " << access("/remote/samba_share/second_drive",
R_OK) << endl;
cout << "raid: " << access("/remote/samba_share/ext_raid", R_OK)
<< endl;
result:
share: 0
local: 0
second: 0
raid: 0
------------------------------------------------------------------------
[2012-05-31 17:43:41] moodboom at gmail dot com
Description:
------------
Calls to PHP's is_readable() function are returning false on a directory that is readable from
the command prompt. I have changed permissions to most-permissible and still no luck.
Any directory under the samba share that is not on the physical primary partition seems to fail.
Here are the permissions as provided in the shell:
ls -lad /remote/samba_share
drwxrwxr-x 13 me users 0 May 29 15:49 /remote/samba_share
ls -la /remote/samba_share
drwxr-xr-x 4 me users 0 May 8 14:19 /remote/samba_share/local_dir
drwxr-xr-x 16 me users 0 May 14 19:49 /remote/samba_share/second_drive
drwxrwxrwx 12 me users 0 May 30 09:42 /remote/samba_share/ext_raid
NOTE: I started this as a question on stackoverflow, because of the number of other possible causes,
but led to this bug report.
http://stackoverflow.com/questions/10818770/php-is-readable-fails-on-readable-samba-directory
Test script:
---------------
if (is_readable('/remote/samba_share' )){ echo "share ok\n"; }
else { echo "share BAD\n"; }
if (is_readable('/remote/samba_share/local_dir' )){ echo "local ok\n"; }
else { echo "local BAD\n"; }
if (is_readable('/remote/samba_share/second_drive' )){ echo "second ok\n"; }
else { echo "second BAD\n"; }
if (is_readable('/remote/samba_share/ext_raid' )){ echo "raid ok\n"; }
else { echo "raid BAD\n"; }
Expected result:
----------------
share ok
local ok
second ok
raid ok
Actual result:
--------------
share ok
local ok
second BAD
raid BAD
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62199&edit=1