ID: 46245
Comment by: adiota at hotmail dot com
Reported By: gabe at mudbugmedia dot com
Status: Open
Bug Type: Filesystem function related
Operating System: Gentoo Linux 2.6.22-hardened-r8
PHP Version: 5.2.6
New Comment:
i am having the same problem i have tested the same code in 5.2.5 and
it works great and when uploaded to version 5.2.6 is_writable returns
true for everything.
Previous Comments:
------------------------------------------------------------------------
[2008-10-06 19:54:46] gabe at mudbugmedia dot com
Description:
------------
When using is_writable() on a read-only file mounted over NFS, it
incorrectly returns true. In our environment, the NFS server is
running
MacOSX Server 10.5 mounted with the following fstab options:
10.10.10.10:/Volumes/Sack /sack nfs
rw,rsize=32768,soft,intr,tcp,nosuid 0 1
Reproduce code:
---------------
gabe...@proto /tmp $ ls -ld /sack/test
dr-xr-xr-x 2 joshbug mudbug 68 Oct 6 14:45 /sack/test/
gabe...@proto /tmp $ ls -ld /tmp/test
dr-xr-xr-x 2 joshbug mudbug 4096 Oct 6 14:44 /tmp/test/
gabe...@proto /tmp $ cat is_writable_test.php
<?php
var_dump(
is_writable('/sack/test'), // /sack is the NFS mount
is_writable('/tmp/test')
);
gabe...@proto /tmp $ php -f is_writable_test.php
Expected result:
----------------
bool(false)
bool(false)
Actual result:
--------------
bool(true)
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46245&edit=1