ID: 27609 Updated by: [EMAIL PROTECTED] Reported By: gobzo at netscape dot net -Status: Open +Status: Feedback Bug Type: *Directory/Filesystem functions Operating System: Windows XP Pro PHP Version: 4.3.5RC3 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip And did it work in some previous version of PHP? (which?) Previous Comments: ------------------------------------------------------------------------ [2004-03-15 15:53:40] gobzo at netscape dot net Apology! I mixed up results. They should read: Expected result: ---------------- Read only Actual result: -------------- Writable ------------------------------------------------------------------------ [2004-03-15 15:51:45] gobzo at netscape dot net Description: ------------ I experience a situation, where Apache runs under the user name, who does not have rights to write to a certain directory. This has been tested and found working: I logged in under that user and received Access denied error trying to save a changed file in this folder. The problem is that if I call is_writable() against files in that folder (and the folder itself!), it will return true which it utterly wrong. Of course, subsequent writes to the files fail because the files in fact can not be written to, but the scripts do not know about that. My wild guess would be this is Windows or WinXP related issue, I do not have a Linux box to check, but if needed, I can set it up - just email me. Reproduce code: --------------- 1. Create a folder 'foo' and file 'bar' in that folder. 2. Create a new user User1 and assign his rights to a folder 'foo' so that his Allow/Write is unchecked. 3. Run Apache under this user. 4. Create ./foo.php with the following code: <?php if (is_writable("bar")) echo "Writable"; else echo "Read only"; ?> 5. Go with your browser to localhost/foo.php Expected result: ---------------- Writable Actual result: -------------- Read only ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27609&edit=1