Bug #62199 [Opn->Fbk]: is_readable() does not seem to tolerate crossing partitions inside a sambashare
| From: | cmb@php.net | Date: | Sun, 08 Jul 2018 14:49:48 +0000 |
| Subject: | Bug #62199 [Opn->Fbk]: 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-216226@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
Updated by: cmb@php.net
Reported by: moodboom at gmail dot com
Summary: is_readable() does not seem to tolerate crossing
partitions inside a sambashare
-Status: Open
+Status: Feedback
Type: Bug
Package: Directory function related
Operating System: linux (gentoo)
PHP Version: 5.3.13
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Does this problem still persist for actively supported PHP
versions[1]?
[1] <http://php.net/supported-versions.php>
Previous Comments:
------------------------------------------------------------------------
[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